Skip to content

fix(event): Update GroupMemberQuit #29

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

Merged
merged 1 commit into from
Sep 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion lagrange/client/events/group.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,11 @@ class GroupMemberQuit(GroupEvent):

@property
def is_kicked(self) -> bool:
return self.exit_type == 131
return self.exit_type in [130, 131]

@property
def is_kicked_self(self) -> bool:
return self.exit_type == 3


@dataclass
Expand Down
2 changes: 1 addition & 1 deletion lagrange/pb/status/group.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
class MemberChanged(ProtoStruct):
uin: int = proto_field(1)
uid: str = proto_field(3)
exit_type: Optional[int] = proto_field(4, default=None) # 131kick, 130exit
exit_type: Optional[int] = proto_field(4, default=None) # 3kick_me, 131kick, 130exit
operator_uid: str = proto_field(5, default="")
join_type: Optional[int] = proto_field(6, default=None) # 6scanqr,

Expand Down