From 50fe134143183ff4db0a8090edb1f93b732369e9 Mon Sep 17 00:00:00 2001 From: Chill Date: Fri, 18 Aug 2023 17:25:10 +0800 Subject: [PATCH] =?UTF-8?q?fix=20#I7U41J=20[app=5Fweb=5Ftranslator]?= =?UTF-8?q?=E8=AE=A9bing=E7=BF=BB=E8=AF=91=E4=B9=9F=E8=83=BD=E8=BF=9B?= =?UTF-8?q?=E8=A1=8C=E5=AF=B9=E8=AF=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app_chatgpt/models/mail_channel.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app_chatgpt/models/mail_channel.py b/app_chatgpt/models/mail_channel.py index d4f4236c..bed7cf1e 100644 --- a/app_chatgpt/models/mail_channel.py +++ b/app_chatgpt/models/mail_channel.py @@ -174,7 +174,9 @@ class Channel(models.Model): # 不处理 一般notify,但处理欢迎 if '
joined the channel
'): - return rdata + return rdata + if 'o_odoobot_command' in message.body: + return rdata if channel_type == 'chat': channel_partner_ids = self.channel_partner_ids @@ -234,7 +236,8 @@ class Channel(models.Model): # elif user_id.gpt_id and not is_allow: # # 暂时有限用户的Ai # raise UserError(_('此Ai暂时未开放,请联系管理员。')) - + if hasattr(ai, 'is_translator') and ai.is_translator: + return rdata chatgpt_channel_id = self.env.ref('app_chatgpt.channel_chatgpt') if message.body == _('
joined the channel
'):