Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]无法区分群会话和群临时会话(群私聊) #151

Open
7est opened this issue Dec 13, 2021 · 0 comments
Open

[BUG]无法区分群会话和群临时会话(群私聊) #151

7est opened this issue Dec 13, 2021 · 0 comments

Comments

@7est
Copy link

7est commented Dec 13, 2021

比如我有一业务需求——机器人通过指令触发回复。群友在群里触发指令,或是对机器人发起群临时会话,在Onebot的websocket推送中都显示为群消息类型,即:如果一群友通过群临时会话触发指令,即使业务允许私聊回复,但机器人还是会将回复误发在群消息中。




复现

新建一个群,群员有测试账号1、测试账号2和机器人,开启群临时会话功能
其中测试账号1和机器人是好友,测试账号2和机器人不是好友。

测试账号1若在群里打开与机器人的私聊,因为双方为好友的缘故,消息为好友间的私聊消息,不会有误。
测试账号2若在群里打开与机器人的私聊,因为双方不为好友的缘故,消息为群临时会话,此时当测试账号2向机器人发送消息,Mirai正常解析消息类型,显示为Temp,而Onebot解析的消息类型仍然为Group Message。如果走正常业务程序逻辑,此时群消息的公屏会出现一个回复。

版本

onebot-mirai - 0.3.4

mirai-core-2.8.0

mirai-console-2.8.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant