Skip to content

Commit

Permalink
fix(msg): GroupInviteAccept parse error
Browse files Browse the repository at this point in the history
  • Loading branch information
wyapx committed Sep 25, 2024
1 parent 59e177b commit 2e95ee9
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions lagrange/client/server_push/msg.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,19 @@ async def msg_push_handler(client: "Client", sso: SSOPacket):
else:
attrs[k.decode()] = v.decode()
if pb.body.type == 1:
return GroupInviteAccept(
grp_id,
attrs["invitor"],
attrs["invitee"]
)
if pb.body.type == 12:
if "invitor" in attrs:
# reserve: attrs["msg_nums"]
return GroupInviteAccept(
grp_id,
attrs["invitor"],
attrs["invitee"]
)
elif "user" in attrs and "uin" in attrs:
# todo: 群代办
pass
else:
raise TypeError(f"Unhandled GrayTips with attribute: {attrs}")
elif pb.body.type == 12:
return GroupNudge(
grp_id,
attrs["uin_str1"],
Expand Down

0 comments on commit 2e95ee9

Please sign in to comment.