diff options
| author | David Beguin <dbe@odoo.com> | 2018-12-03 15:26:18 +0000 |
|---|---|---|
| committer | David Beguin <dbe@odoo.com> | 2018-12-05 14:37:10 +0000 |
| commit | 8c8f219b4764173fb1ac924d8a46d9dcdbb85d57 (patch) | |
| tree | bb7a517120e446671ef7676beaa017df42c98e3b /addons/mail/static/src/js/models/threads | |
| parent | 9281ae81f90cb58cdeb9b3e09ae2a1f1faca0d2c (diff) | |
[IMP] im_livechat : uses anonymous name only if visitor is anonymous
Before, if the visitor was logged in, anonymous name = user.name.
But if we use anonymous name field even if visitor is not anonymous,
we cannot know, in stat e.g., if the session was really made with
an anonymous visitor or not as the field is always filled in.
Now, if the visitor is not anonymous, we use directly the user.name
but we do not fill in the anonymous name. So that if anonymous name
is null, we know afterwards that the session was made we a real
anonymous visitor.
Since the anonymous name is empty if visitor is logged in,
we cannot use anonymous_name anymore to get the title of the session window.
Task ID : 1895998
Closes PR #28283
Diffstat (limited to 'addons/mail/static/src/js/models/threads')
| -rw-r--r-- | addons/mail/static/src/js/models/threads/livechat.js | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/addons/mail/static/src/js/models/threads/livechat.js b/addons/mail/static/src/js/models/threads/livechat.js index f4cb58ebad3..45cab5aef10 100644 --- a/addons/mail/static/src/js/models/threads/livechat.js +++ b/addons/mail/static/src/js/models/threads/livechat.js @@ -17,13 +17,10 @@ var Livechat = TwoUserChannel.extend({ * @override * @param {Object} params * @param {Object} params.data - * @param {string} params.data.anonymous_name name of the website user */ init: function (params) { this._super.apply(this, arguments); - - this._name = params.data.anonymous_name; - + this._name = params.data.correspondent_name; this._WEBSITE_USER_NAME = this._name; }, |
