diff options
Diffstat (limited to 'addons/im_livechat/static/src/components/thread_needaction_preview')
| -rw-r--r-- | addons/im_livechat/static/src/components/thread_needaction_preview/thread_needaction_preview.js | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/addons/im_livechat/static/src/components/thread_needaction_preview/thread_needaction_preview.js b/addons/im_livechat/static/src/components/thread_needaction_preview/thread_needaction_preview.js new file mode 100644 index 00000000..3cd95824 --- /dev/null +++ b/addons/im_livechat/static/src/components/thread_needaction_preview/thread_needaction_preview.js @@ -0,0 +1,28 @@ +odoo.define('im_livechat/static/src/components/thread_needaction_preview/thread_needaction_preview.js', function (require) { +'use strict'; + +const components = { + ThreadNeedactionPreview: require('mail/static/src/components/thread_needaction_preview/thread_needaction_preview.js'), +}; + +const { patch } = require('web.utils'); + +patch(components.ThreadNeedactionPreview, 'thread_needaction_preview', { + + //-------------------------------------------------------------------------- + // Public + //-------------------------------------------------------------------------- + + /** + * @override + */ + image(...args) { + if (this.thread.channel_type === 'livechat') { + return '/mail/static/src/img/smiley/avatar.jpg'; + } + return this._super(...args); + } + +}); + +}); |
