summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Kühn <aku@odoo.com>2020-02-25 11:53:08 +0000
committerAlexandre Kühn <aku@odoo.com>2020-02-25 14:50:22 +0000
commit5da345449941fc843e27d87b8df7a619d2575c5c (patch)
treeddd638e12c9c766eb0b9bccdc36963db8990f3a7
parent86fd7ab4f0a4eabf4ff6f8b9dd00b5733e4f0253 (diff)
[FIX] im_livechat: pin "chat" channels on message post
Revision on https://github.com/odoo/odoo/commit/abeb75ae6006b50dace9397db35c08c90f6cc568 Commit above fixed an issue where livechat channels were not pinned on the UI after page refresh. To do so, it marked channels of type "chat" and "livechat" as chat channels. However, this failed marking channels of type "chat" as chat channels, because it mistakenly unset these channels while processing livechat channels. As a result, chat channels were not marked as pinned, resulting in this channel not being visible in the interface. Steps to reproduce: 1. Connect as Admin. 2. Have unpinned conversation with Demo. 3. Receive a new private message from Demo. 4. Refresh page => the conversation is not visible in Discuss app or in systray messaging menu. This commit fixes the issue by not overriding channels that have not been marked as `is_chat`. This way, channels of type "chat" and "livechat" are correctly considered as chat channels. closes odoo/odoo#46266 X-original-commit: 72a9498ac93d15767f221e3db9b94f38f1c2e8b5 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
-rw-r--r--addons/im_livechat/models/mail_channel.py2
1 files changed, 0 insertions, 2 deletions
diff --git a/addons/im_livechat/models/mail_channel.py b/addons/im_livechat/models/mail_channel.py
index 30ee3699bf5..c7ca4098093 100644
--- a/addons/im_livechat/models/mail_channel.py
+++ b/addons/im_livechat/models/mail_channel.py
@@ -46,8 +46,6 @@ class MailChannel(models.Model):
for record in self:
if record.channel_type == 'livechat':
record.is_chat = True
- else:
- record.is_chat = False
def _channel_message_notifications(self, message, message_format=False):
""" When a anonymous user create a mail.channel, the operator is not notify (to avoid massive polling when