mirror of
https://github.com/bringout/oca-ocb-mail.git
synced 2026-04-23 07:22:03 +02:00
19.0 vanilla
This commit is contained in:
parent
5df8c07b59
commit
daa394e8b0
2114 changed files with 564841 additions and 299642 deletions
|
|
@ -0,0 +1,21 @@
|
|||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo import models
|
||||
|
||||
|
||||
class IrWebsocket(models.AbstractModel):
|
||||
_inherit = "ir.websocket"
|
||||
|
||||
def _build_bus_channel_list(self, channels):
|
||||
channels = list(channels) # do not alter original list
|
||||
if any(
|
||||
channel == "im_livechat.looking_for_help"
|
||||
for channel in channels
|
||||
if isinstance(channel, str)
|
||||
):
|
||||
if self.env.user.has_group("im_livechat.im_livechat_group_user"):
|
||||
channels.append(
|
||||
(self.env.ref("im_livechat.im_livechat_group_user"), "LOOKING_FOR_HELP")
|
||||
)
|
||||
channels.remove("im_livechat.looking_for_help")
|
||||
return super()._build_bus_channel_list(channels)
|
||||
Loading…
Add table
Add a link
Reference in a new issue