[FIX] bus,im_livechat: away status after 30 minutes of inactivity

Also, away users aren't considered as available for the livechat anymore.
This commit is contained in:
Aaron Bohy
2015-12-29 09:41:18 +01:00
parent 1d371e94f6
commit 97a61f9e76
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ from openerp.tools.misc import DEFAULT_SERVER_DATETIME_FORMAT
from openerp.addons.bus.models.bus import TIMEOUT
DISCONNECTION_TIMER = TIMEOUT + 5
AWAY_TIMER = 600 # 10 minutes
AWAY_TIMER = 1800 # 30 minutes
class BusPresence(models.Model):
@@ -144,7 +144,7 @@ class ImLivechatChannel(models.Model):
:retuns : return the res.users having their im_status online
"""
self.ensure_one()
return self.sudo().user_ids.filtered(lambda user: user.im_status == 'online' or user.im_status == 'away')
return self.sudo().user_ids.filtered(lambda user: user.im_status == 'online')
@api.model
def get_mail_channel(self, livechat_channel_id, anonymous_name):