Skip to content

Commit

Permalink
add reply_suffix
Browse files Browse the repository at this point in the history
增加私聊和群聊回复后缀的可选配置
  • Loading branch information
6vision committed Jun 17, 2023
1 parent 4dc5356 commit dbe2f17
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions channel/chat_channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,9 @@ def _decorate_reply(self, context: Context, reply: Reply) -> Reply:
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
Expand Down

0 comments on commit dbe2f17

Please sign in to comment.