diff options
author | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-09-03 03:37:55 +0200 |
---|---|---|
committer | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-09-03 03:37:55 +0200 |
commit | acb5fba488c6b407450be3fc0981dd897e4dfaef (patch) | |
tree | e652ab2f27f60543c7769ec240ec19ba204568b2 /gateway/src/opcodes/Identify.ts | |
parent | fix #309 (diff) | |
download | server-acb5fba488c6b407450be3fc0981dd897e4dfaef.tar.xz |
:bug: fix member + member list
Diffstat (limited to 'gateway/src/opcodes/Identify.ts')
-rw-r--r-- | gateway/src/opcodes/Identify.ts | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/gateway/src/opcodes/Identify.ts b/gateway/src/opcodes/Identify.ts index 73c9a29e..2b2c31c5 100644 --- a/gateway/src/opcodes/Identify.ts +++ b/gateway/src/opcodes/Identify.ts @@ -57,8 +57,16 @@ export async function onIdentify(this: WebSocket, data: Payload) { } const members = await Member.find({ - where: { user_id: this.user_id }, - relations: ["guild", "guild.channels", "guild.emojis", "guild.roles", "guild.stickers", "user", "roles"], + where: { id: this.user_id }, + relations: [ + "guild", + "guild.channels", + "guild.emojis", + "guild.roles", + "guild.stickers", + "user", + "roles", + ], }); const merged_members = members.map((x: any) => { return [x]; @@ -67,7 +75,7 @@ export async function onIdentify(this: WebSocket, data: Payload) { const user_guild_settings_entries = members.map((x) => x.settings); const recipients = await Recipient.find({ - where: { id: this.user_id }, + where: { user_id: this.user_id }, relations: ["channel", "channel.recipients"], }); const channels = recipients.map((x) => x.channel); |