diff --git a/addons/mail/static/src/js/chat_window.js b/addons/mail/static/src/js/chat_window.js index 3a50082e017..73f2ffd7c56 100644 --- a/addons/mail/static/src/js/chat_window.js +++ b/addons/mail/static/src/js/chat_window.js @@ -16,12 +16,15 @@ return Widget.extend({ "click .o_chat_title": "on_click_fold", }, - init: function (parent, channel_id, title, is_folded) { + init: function (parent, channel_id, title, is_folded, options) { this._super(parent); this.title = title; this.channel_id = channel_id; this.placeholder = _t("Say something"); this.folded = is_folded; + this.options = _.defaults(options || {}, { + display_stars: true, + }); }, start: function () { this.$content = this.$('.o_chat_content'); @@ -30,6 +33,7 @@ return Widget.extend({ this.thread = new ChatThread(this, { display_avatar: false, display_needactions: false, + display_stars: this.options.display_stars, }); this.thread.on('toggle_star_status', this, function (message_id) { this.trigger('toggle_star_status', message_id); diff --git a/addons/mail/static/src/js/thread.js b/addons/mail/static/src/js/thread.js index 190391d94de..95f02f45077 100644 --- a/addons/mail/static/src/js/thread.js +++ b/addons/mail/static/src/js/thread.js @@ -34,6 +34,7 @@ var Thread = Widget.extend({ this.options = _.defaults(options || {}, { display_order: ORDER.ASC, display_needactions: true, + display_stars: true, default_username: _t('Anonymous'), display_document_link: true, display_avatar: true, diff --git a/addons/mail/static/src/xml/thread.xml b/addons/mail/static/src/xml/thread.xml index da318464b71..1a0240282d4 100644 --- a/addons/mail/static/src/xml/thread.xml +++ b/addons/mail/static/src/xml/thread.xml @@ -37,8 +37,12 @@