From 52995f5573953976dcf49b825a01270aee8e57f1 Mon Sep 17 00:00:00 2001 From: Azarow Date: Wed, 11 Sep 2024 17:23:40 +0200 Subject: [PATCH] fix: include server_id in member normalization during GuildMemberAddPacket event --- .../packets/listeners/guild_member_add_packet.dart | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/src/infrastructure/internals/packets/listeners/guild_member_add_packet.dart b/lib/src/infrastructure/internals/packets/listeners/guild_member_add_packet.dart index 6f175f611..3b077c350 100644 --- a/lib/src/infrastructure/internals/packets/listeners/guild_member_add_packet.dart +++ b/lib/src/infrastructure/internals/packets/listeners/guild_member_add_packet.dart @@ -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);