From dbe2f17e1a9d5c4cfc65eeac9c3c425b98ef3e47 Mon Sep 17 00:00:00 2001 From: vision Date: Sat, 17 Jun 2023 15:46:03 +0800 Subject: [PATCH] add reply_suffix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 增加私聊和群聊回复后缀的可选配置 --- channel/chat_channel.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/channel/chat_channel.py b/channel/chat_channel.py index 6a2f11e..ffb49c8 100644 --- a/channel/chat_channel.py +++ b/channel/chat_channel.py @@ -223,9 +223,9 @@ class ChatChannel(Channel): return self._decorate_reply(context, reply) if context.get("isgroup", False): reply_text = "@" + context["msg"].actual_user_nickname + "\n" + reply_text.strip() - reply_text = conf().get("group_chat_reply_prefix", "") + reply_text + reply_text = conf().get("group_chat_reply_prefix", "") + reply_text + conf().get("group_chat_reply_suffix", "") else: - reply_text = conf().get("single_chat_reply_prefix", "") + reply_text + reply_text = conf().get("single_chat_reply_prefix", "") + reply_text + conf().get("single_chat_reply_suffix", "") reply.content = reply_text elif reply.type == ReplyType.ERROR or reply.type == ReplyType.INFO: reply.content = "[" + str(reply.type) + "]\n" + reply.content