[fix]修复临时会话消息被错误发送到群聊的bug#122
Merged
fumiama merged 4 commits intowdvxdr1123:mainfrom Apr 4, 2026
Merged
Conversation
Contributor
Author
There was a problem hiding this comment.
Pull request overview
该 PR 修复在临时会话(私聊)事件可能携带 GroupID 的情况下,Ctx.Send 通过 GroupID != 0 推断目标导致回复被错误发送到群聊的问题;改为优先根据 message_type(group/private)选择发送目标,从而确保临时会话按私聊路径发送。
Changes:
Ctx.Send在普通消息发送场景下改用event.MessageType(group/private)决定调用SendGroupMessage/SendPrivateMessageCtx.Send在合并转发场景下同样基于event.MessageType决定调用SendGroupForwardMessage/SendPrivateForwardMessage- 保留
MessageType异常/缺失时的兜底逻辑(继续回退到GroupID != 0的判断)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
fumiama
requested changes
Mar 29, 2026
fumiama
requested changes
Apr 1, 2026
fumiama
approved these changes
Apr 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
这个pr是为了修复

此前通过
GroupID != 0判断消息发送目标(群聊/私聊),但在 临时会话(私聊)也可能包含
GroupID,导致消息被错误发送到群聊。
此前的效果图,如果有reply则会