Skip to content
This repository has been archived by the owner on Aug 2, 2020. It is now read-only.

Commit

Permalink
Fix "group_decrease" event
Browse files Browse the repository at this point in the history
  • Loading branch information
stdrc committed May 11, 2017
1 parent 14e4f74 commit 07f9ac8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/Post.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ Authorization: token kSLuTF2GC2Q4q4ugm3
| ------------- | ------ | ------------------------------ | ---------------------------------------- |
| `post_type` | string | `"event"` | 上报类型 |
| `event` | string | `"group_decrease"` | 事件名 |
| `sub_type` | string | `"leave"``"kick"``"kick_me"` | 事件子类型,分别表示主动退群、成员被踢、登录号被踢(但是似乎登录号被踢也会表现为 `"kick"` |
| `sub_type` | string | `"leave"``"kick"``"kick_me"` | 事件子类型,分别表示主动退群、成员被踢、登录号被踢 |
| `group_id` | number | - | 群号 |
| `user_id` | number | - | 离开者 QQ 号 |
| `operator_id` | number | - | 操作者 QQ 号(如果是主动退群,则和 `user_id` 相同) |
Expand Down
7 changes: 5 additions & 2 deletions src/appmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -467,8 +467,11 @@ CQEVENT(int32_t, __eventSystem_GroupMemberDecrease, 32)
sub_type_str = "leave";
break;
case 2:
sub_type_str = "kick";
break;
if (being_operate_qq != CQ_getLoginQQ(ac)) {
// the one been kicked out is not me
sub_type_str = "kick";
break;
}
case 3:
sub_type_str = "kick_me";
break;
Expand Down

0 comments on commit 07f9ac8

Please sign in to comment.