Skip to content

Commit a76eb3e

Browse files
committed
feat(event}: Update GroupMemberQuit
1 parent 67600ea commit a76eb3e

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

lagrange/client/events/group.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,11 @@ class GroupMemberQuit(GroupEvent):
9595

9696
@property
9797
def is_kicked(self) -> bool:
98-
return self.exit_type == 131
98+
return self.exit_type in [130, 131]
99+
100+
@property
101+
def is_kicked_self(self) -> bool:
102+
return self.exit_type == 3
99103

100104

101105
@dataclass

lagrange/pb/status/group.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
class MemberChanged(ProtoStruct):
1111
uin: int = proto_field(1)
1212
uid: str = proto_field(3)
13-
exit_type: Optional[int] = proto_field(4, default=None) # 131kick, 130exit
13+
exit_type: Optional[int] = proto_field(4, default=None) # 3kick_me, 131kick, 130exit
1414
operator_uid: str = proto_field(5, default="")
1515
join_type: Optional[int] = proto_field(6, default=None) # 6scanqr,
1616

0 commit comments

Comments
 (0)