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

新用户入群 MemberJoinEvent 事件无法触发 #641

Closed
ichenhe opened this issue Oct 7, 2020 · 4 comments
Closed

新用户入群 MemberJoinEvent 事件无法触发 #641

ichenhe opened this issue Oct 7, 2020 · 4 comments
Labels
M 优先级: 主要 t:bug 类型: bug x:protocol 属性: 协议相关
Milestone

Comments

@ichenhe
Copy link

ichenhe commented Oct 7, 2020

监听 MemberJoinEvent 无法得到任何触发,已尝试 PHONE、PAD、WATCH 三种协议,均存在问题。
相关代码如下:

// 自动通过申请,工作正常
bot.subscribeAlways<MemberJoinRequestEvent> { event ->
    if (event.groupId == GROUP_TEST) {
        event.accept()
    }
}

// 无法触发
bot.subscribeAlways<MemberJoinEvent> { event->
    bot.logger.info("${event.member.nameCardOrNick}(${event.member.id})已加入群${event.group.name}")
}

控制台输出:

2020-10-07 22:27:44 V/Bot 3100375360: Event: MemberJoinRequestEvent(bot=Bot(xxxxxx), eventId=1602080863993904, message=111, fromId=xxxxxxx, groupId=xxxxxx, groupName=测试群, fromNick=xxxxxx)
2020-10-07 22:27:44 V/Net 3100375360: Send: ProfileService.Pb.ReqSystemMsgAction.Group
2020-10-07 22:27:44 V/Net 3100375360: Recv: net.mamoe.mirai.qqandroid.network.protocol.data.jce.RequestPushNotify@7bbe86b6
2020-10-07 22:27:44 V/Net 3100375360: Send: MessageSvc.PbGetMsg
2020-10-07 22:27:44 D/Net 3100375360: Received unknown commandName: ProfileService.Pb.ReqSystemMsgAction.Group
2020-10-07 22:27:44 V/Net 3100375360: Send: OnlinePush.RespPush
2020-10-07 22:27:44 V/Net 3100375360: Send: MessageSvc.PbDeleteMsg
2020-10-07 22:27:53 V/Net 3100375360: Send: OnlinePush.RespPush
2020-10-07 22:28:29 V/Net 3100375360: Send: Heartbeat.Alive
2020-10-07 22:28:29 V/Net 3100375360: Recv: Heartbeat.Alive.Response

复现

让一个账户申请加群即可。

版本

mirai: 1.3.2

@ichenhe ichenhe added the t:problem 类型: 不容易归类为特性或 bug 的综合问题 label Oct 7, 2020
@Him188 Him188 added x:protocol 属性: 协议相关 protocol:sync t:bug 类型: bug M 优先级: 主要 and removed t:problem 类型: 不容易归类为特性或 bug 的综合问题 labels Oct 7, 2020
@Him188 Him188 added this to the 2.0-M1 milestone Oct 7, 2020
@Him188
Copy link
Member

Him188 commented Oct 24, 2020

可能与 #651 有关

@sandtechnology
Copy link
Collaborator

请问在最新的2.0-RC中是否能够重现?

@ichenhe
Copy link
Author

ichenhe commented Jan 12, 2021

请问在最新的2.0-RC中是否能够重现?

我周末回家后测试下

@Him188 Him188 closed this as completed in 45072c9 Jan 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
M 优先级: 主要 t:bug 类型: bug x:protocol 属性: 协议相关
Projects
None yet
Development

No branches or pull requests

4 participants
@ichenhe @Him188 @sandtechnology and others