Skip to content

Commit

Permalink
fix: include server_id in member normalization during GuildMemberAddP…
Browse files Browse the repository at this point in the history
…acket event
  • Loading branch information
ThibaultPointurier authored and LeadcodeDev committed Sep 11, 2024
1 parent 2949c72 commit 52995f5
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@ final class GuildMemberAddPacket implements ListenablePacket {
final server = await marshaller.dataStore.server
.getServer(message.payload['guild_id']);

final rawMember =
await marshaller.serializers.member.normalize(message.payload);
final rawMember = await marshaller.serializers.member.normalize({
'server_id': server.id,
...message.payload,
});

final member = await marshaller.serializers.member.serialize(rawMember);

server.members.list.putIfAbsent(member.id, () => member);
Expand Down

0 comments on commit 52995f5

Please sign in to comment.