Skip to content

Commit

Permalink
fix: hello plugin trigger app bug
Browse files Browse the repository at this point in the history
  • Loading branch information
zhayujie committed Dec 7, 2023
1 parent 40fd545 commit 14ae2f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/hello/hello.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ def on_handle_context(self, e_context: EventContext):
reply.content = conf().get("group_welcome_msg", "")
e_context["reply"] = reply
e_context.action = EventAction.BREAK_PASS # 事件结束,并跳过处理context的默认逻辑
if not self.config or not self.config.get("use_character_desc"):
e_context["context"]["generate_breaked_by"] = EventAction.BREAK_PASS
return
e_context["context"].type = ContextType.TEXT
msg: ChatMessage = e_context["context"]["msg"]
e_context["context"].content = f'请你随机使用一种风格说一句问候语来欢迎新用户"{msg.actual_user_nickname}"加入群聊。'
e_context.action = EventAction.BREAK # 事件结束,进入默认处理逻辑
if not self.config or not self.config.get("use_character_desc"):
e_context["context"]["generate_breaked_by"] = EventAction.BREAK
return

if e_context["context"].type == ContextType.EXIT_GROUP:
Expand Down

0 comments on commit 14ae2f1

Please sign in to comment.