whitechi73 / OpenShamrock

A Bot Framework based on Lsposed with OneBot11
https://whitechi73.github.io/OpenShamrock
GNU General Public License v3.0
1.39k stars 178 forks source link

bug: 群成员增加事件缺少user_id #74

Closed mintianzan closed 8 months ago

mintianzan commented 8 months ago

警告: 在进一步操作之前,请检查下列选项。如果您忽视此模板或者没有提供关键信息,您的 Issue 将直接被关闭

描述 Bug

报错: File "pydantic\main.py", line 526, in pydantic.main.BaseModel.parse_obj return cls(**obj) File "pydantic\main.py", line 341, in pydantic.main.BaseModel.init raise validation_error pydantic.error_wrappers.ValidationError: 1 validation error for GroupIncreaseNoticeEvent user_id field required (type=value_error.missing)

nonebot事件: 11-23 15:41:42 [SUCCESS] nonebot | OneBot V11 机器人qq | [notice.group_increase.approve]: {'time': 1700725303, 'self_id': 机器人qq, 'post_type': 'notice', 'notice_type': 'group_increase', 'sub_type': 'approve', 'group_id': 群号, 'sender_id': 管理员qq, 'operator_id': 管理员qq}

其中也同样没有显示到新成员qq

复现 Bug

加入群聊方式:需要回答问题管理员审核, 先后有如下事件

| [notice.group_apply.add]: {'time': 1700725282, 'self_id':机器人qq, 'post_type': 'notice', 'notice_type': 'group_apply', 'sub_type': 'add', 'group_id': 群号, 'tip_text': '问 题:问题内容\n答案:答案内容'}

| [notice.group_apply.invite]: {'time': 1700725303, 'self_id': 机器人qq, 'post_type': 'notice', 'notice_type': 'group_apply', 'sub_type': 'invite', 'operator_id': 管理员qq, 'group_id': 群号}

-----上述报错发生在此位置-----

| [notice.group_increase.approve]: {'time': 1700725303, 'self_id': 机器人qq, 'post_type': 'notice', 'notice_type': 'group_increase', 'sub_type': 'approve', 'group_id': 群号, 'sender_id': 管理员qq, 'operator_id': 管理员qq}

系统信息

ikechan8370 commented 8 months ago

没能复现出来不带user_id的群员增加事件,希望能提供shamrock本身的日志和推送的event本体。 但是邀请事件确实少了个user_id,已经补上了,你更新试试看?也有可能是因为shamrock目前没有分request和notice,统一写在notice了,然后nb把邀请事件当群员增加处理了。

fuqiuluo commented 8 months ago

没能复现出来不带user_id的群员增加事件,希望能提供shamrock本身的日志和推送的event本体。 但是邀请事件确实少了个user_id,已经补上了,你更新试试看?也有可能是因为shamrock目前没有分request和notice,统一写在notice了,然后nb把邀请事件当群员增加处理了。

加个request事件?

ikechan8370 commented 8 months ago

没能复现出来不带user_id的群员增加事件,希望能提供shamrock本身的日志和推送的event本体。 但是邀请事件确实少了个user_id,已经补上了,你更新试试看?也有可能是因为shamrock目前没有分request和notice,统一写在notice了,然后nb把邀请事件当群员增加处理了。

加个request事件?

加了