From a8f83cb49d0a8084c7eecd9f179fb1418cb546e0 Mon Sep 17 00:00:00 2001 From: Chill Date: Mon, 10 Apr 2023 16:42:18 +0800 Subject: [PATCH] update app_chatgpt --- app_chatgpt/models/mail_channel.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app_chatgpt/models/mail_channel.py b/app_chatgpt/models/mail_channel.py index 5ed4d265..3c1a530f 100644 --- a/app_chatgpt/models/mail_channel.py +++ b/app_chatgpt/models/mail_channel.py @@ -48,10 +48,7 @@ class Channel(models.Model): res = ai.get_ai(prompt, partner_name) if res: res = res.replace('\n', '
') - if channel.channel_type == 'chat': - channel.with_user(user_id).message_post(body=res, message_type='comment', subtype_xmlid='mail.mt_comment') - else: - channel.with_user(user_id).message_post(body=res, message_type='comment', subtype_xmlid='mail.mt_comment', parent_id=message.id) + channel.with_user(user_id).message_post(body=res, message_type='comment', subtype_xmlid='mail.mt_comment', parent_id=message.id) def _notify_thread(self, message, msg_vals=False, **kwargs): rdata = super(Channel, self)._notify_thread(message, msg_vals=msg_vals, **kwargs)