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

NewFriendRequestEvent 和 BotInvitedJoinGroupRequestEvent 没有被调用,单向好友无法收消息 #610

Closed
zhaodice opened this issue Sep 16, 2020 · 9 comments
Labels
N 优先级: 一般 t:feature 类型: 新特性 x:protocol 属性: 协议相关 x:question 标签: 需要更多信息
Milestone

Comments

@zhaodice
Copy link
Contributor

zhaodice commented Sep 16, 2020

核心代码:
bot.subscribeAlways {
AwLog.Log("收到好友请求,正在自动同意...")
accept()//自动同意好友
}
bot.subscribeAlways {
AwLog.Log("收到群邀请请求,正在自动同意...")
accept()//邀请自动同意进群
}
结果:
加好友/邀请入群,事件不执行
邀请bot进群,电脑版未收到入群邀请(但开mirai之前可以收,把mirai关闭一段时间后也能收,怀疑是被屏蔽了),BotInvitedJoinGroupRequestEvent没有执行
删除bot好友后重新添加,NewFriendRequestEvent没有执行,并打印了log
23:47:03 [INFO] [NETWORK] Recv: net.mamoe.mirai.qqandroid.network.protocol.data.jce.RequestPushNotify@90fbc
23:47:03 [INFO] [NETWORK] Send: MessageSvc.PbGetMsg
23:47:03 [INFO] [NETWORK] Send: OnlinePush.RespPush
23:47:03 [INFO] [NETWORK] Send: MessageSvc.PbDeleteMsg
23:47:03 [INFO] [NETWORK] unknown PbGetMsg type 528, data=08 23 12 04 1A 02 08 01
23:47:03 [INFO] [NETWORK] unknown PbGetMsg type 528, data=08 23 12 41 12 3F 08 F5 CD E9 D6 0C 10 CA B1 86 E7 01 18 09 20 F9 E6 88 FB 05 2A 0B E6 9D A5 E8 87 AA 51 51 E7 BE A4 3A 00 42 16 08 83 B0 AF D0 02 12 0C E9 9B BE E4 B8 AD E6 B6 88 E9 80 9D 1A 00 4A 00 52 00
23:47:03 [INFO] [NETWORK] unknown PbGetMsg type 191, data=01 18 8D 5B D8 BF 82 4E 2D AA A7 86 F4 D3 A9 22 10 5B 2D 3D C2 55 0C 34 BB C5 00 06 00 00 00 00 00 4F 00 00 00 00 00 00 00 00 02 03 E8 00 16 08 83 B0 AF D0 02 12 0C E9 9B BE E4 B8 AD E6 B6 88 E9 80 9D 1A 00 03 ED 00 28 08 01 12 15 E7 BE A4 E8 B5 B5 E5 96 B5 E5 86 B3 E4 B8 8D E8 B0 A2 E7 BD AA 18 00 22 09 E8 B5 B5 E5 96 B5 E5 96 B5 28 01

如何复现:
登陆bot后直接使用
bot.subscribeAlways {
AwLog.Log("收到好友请求,正在自动同意...")
accept()//自动同意好友
}
bot.subscribeAlways {
AwLog.Log("收到群邀请请求,正在自动同意...")
accept()//邀请自动同意进群
}
就可以发现这两个事件根本就不执行,NewFriendRequestEvent是上述的错误信息,无论是插件的形式还是直接运行的形式,都无法正常工作。

单向好友来消息时会产生报错信息从而无法正常接收:
00:00:37 [INFO] [NETWORK] Recv: net.mamoe.mirai.qqandroid.network.protocol.data.jce.RequestPushNotify@1e608a5
00:00:37 [INFO] [NETWORK] Send: MessageSvc.PbGetMsg
00:00:38 [INFO] [NETWORK] Send: MessageSvc.PbDeleteMsg
00:00:38 [INFO] [BOT *] Event: MessageSvcPbGetMsg.Response(syncFlagFromServer=CONTINUE, messages=))
00:00:38 [INFO] [NETWORK] Send: MessageSvc.PbGetMsg
00:00:38 [INFO] [NETWORK] Send: MessageSvc.PbDeleteMsg
00:00:38 [INFO] [BOT *] Event: MessageSvcPbGetMsg.Response(syncFlagFromServer=CONTINUE, messages=))
00:00:38 [INFO] [NETWORK] Send: MessageSvc.PbGetMsg
00:00:38 [INFO] [NETWORK] Send: MessageSvc.PbDeleteMsg
00:00:38 [INFO] [BOT *] Event: MessageSvcPbGetMsg.Response(syncFlagFromServer=CONTINUE, messages=))
00:00:38 [INFO] [NETWORK] Send: MessageSvc.PbGetMsg
00:00:38 [INFO] [NETWORK] Send: MessageSvc.PbDeleteMsg

版本

mirai: 1.3.0

@zhaodice zhaodice added the t:problem 类型: 不容易归类为特性或 bug 的综合问题 label Sep 16, 2020
@Him188
Copy link
Member

Him188 commented Sep 16, 2020

你确认使用的是1.3.0吗?

看来是又有一个新的包....

@Him188 Him188 added the x:protocol 属性: 协议相关 label Sep 16, 2020
@zhaodice
Copy link
Contributor Author

你确认使用的是1.3.0吗?

看来是又有一个新的包....

@Him188
这个我可以肯定,
implementation("net.mamoe:mirai-core-qqandroid:1.3.0")

@sandtechnology
Copy link
Collaborator

sandtechnology commented Sep 17, 2020 via email

@zhaodice
Copy link
Contributor Author

@sandtechnology QQ 9.3.5 我用的是绿化修改版,我觉得不可能影响数据包什么的

@Him188 Him188 added t:feature 类型: 新特性 N 优先级: 一般 and removed t:problem 类型: 不容易归类为特性或 bug 的综合问题 labels Sep 17, 2020
@Pika-Lee

This comment has been minimized.

@Him188

This comment has been minimized.

@Pika-Lee

This comment has been minimized.

@sandtechnology
Copy link
Collaborator

请问在最新的 2.1.0-dev-1 中,该问题是否能重现?

@Him188 Him188 added the x:question 标签: 需要更多信息 label Jan 21, 2021
@Him188 Him188 modified the milestones: 2.1.0, 2.2.0 Jan 21, 2021
@Him188 Him188 removed this from the 2.2.0 milestone Jan 29, 2021
@zhaodice
Copy link
Contributor Author

请问在最新的 2.1.0-dev-1 中,该问题是否能重现?

最新的版本(2.4.0)里暂时没有问题了,至少目前无人反馈。

@Him188 Him188 added this to the 2.8-M1 milestone Jul 14, 2021
@Him188 Him188 added the x:sync 属性: 与同步有关 label Aug 25, 2021
@Him188 Him188 removed the x:sync 属性: 与同步有关 label Sep 12, 2021
@Him188 Him188 closed this as completed Sep 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
N 优先级: 一般 t:feature 类型: 新特性 x:protocol 属性: 协议相关 x:question 标签: 需要更多信息
Projects
None yet
Development

No branches or pull requests

4 participants