[FIX] im_livechat: channel info: available key
should be the length of the recordset of connected users, not the recordset itself, which is always evaluated as True (thus, the im_livechat script was always embedded in the html pages).
This commit is contained in:
@@ -195,7 +195,7 @@ class ImLivechatChannel(models.Model):
|
||||
@api.model
|
||||
def get_livechat_info(self, channel_id, username='Visitor'):
|
||||
info = {}
|
||||
info['available'] = self.browse(channel_id).get_available_users(),
|
||||
info['available'] = len(self.browse(channel_id).get_available_users())
|
||||
if info['available']:
|
||||
info['server_url'] = self.env['ir.config_parameter'].get_param('web.base.url')
|
||||
info['options'] = self.sudo().get_channel_infos(channel_id)
|
||||
|
||||
Reference in New Issue
Block a user