summary refs log tree commit diff
path: root/gateway/src
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2022-08-06 18:25:30 +0200
committerTheArcaneBrony <myrainbowdash949@gmail.com>2022-08-09 23:28:27 +0200
commitcba3844c6f7a6b26c93d8061da0ca7fe6b291e92 (patch)
tree515a4000f4d26ab1999644b9dd6a057e03041bcf /gateway/src
parentmigrate to DataSource (diff)
downloadserver-cba3844c6f7a6b26c93d8061da0ca7fe6b291e92.tar.xz
Resolve changes undone by rebasing from master
Diffstat (limited to 'gateway/src')
-rw-r--r--gateway/src/listener/listener.ts4
-rw-r--r--gateway/src/opcodes/Identify.ts4
-rw-r--r--gateway/src/opcodes/LazyRequest.ts2
-rw-r--r--gateway/src/opcodes/VoiceStateUpdate.ts2
4 files changed, 6 insertions, 6 deletions
diff --git a/gateway/src/listener/listener.ts b/gateway/src/listener/listener.ts

index 0cf2b82b..8c69e193 100644 --- a/gateway/src/listener/listener.ts +++ b/gateway/src/listener/listener.ts
@@ -49,10 +49,10 @@ export async function setupListener(this: WebSocket) { where: { user_id: this.user_id, closed: false }, relations: ["channel"], }), - Relationship.find({ + Relationship.find({ where: { from_id: this.user_id, type: RelationshipType.friends, - }), + } }), ]); const guilds = members.map((x) => x.guild); diff --git a/gateway/src/opcodes/Identify.ts b/gateway/src/opcodes/Identify.ts
index bfe748f1..13d55559 100644 --- a/gateway/src/opcodes/Identify.ts +++ b/gateway/src/opcodes/Identify.ts
@@ -58,7 +58,7 @@ export async function onIdentify(this: WebSocket, data: Payload) { relations: ["relationships", "relationships.to"], select: [...PrivateUserProjection, "relationships"], }), - ReadState.find({ user_id: this.user_id }), + ReadState.find({ where: { user_id: this.user_id } }), Member.find({ where: { id: this.user_id }, select: MemberPrivateProjection, @@ -96,7 +96,7 @@ export async function onIdentify(this: WebSocket, data: Payload) { }, activities: [], }).save(), - Application.findOne({ id: this.user_id }), + Application.findOne({ where: { id: this.user_id } }), ]); if (!user) return this.close(CLOSECODES.Authentication_failed); diff --git a/gateway/src/opcodes/LazyRequest.ts b/gateway/src/opcodes/LazyRequest.ts
index dd96d6d7..974769e9 100644 --- a/gateway/src/opcodes/LazyRequest.ts +++ b/gateway/src/opcodes/LazyRequest.ts
@@ -120,7 +120,7 @@ export async function onLazyRequest(this: WebSocket, { d }: Payload) { const ranges = channels![channel_id]; if (!Array.isArray(ranges)) throw new Error("Not a valid Array"); - const member_count = await Member.count({ guild_id }); + const member_count = await Member.count({ where: { guild_id } }); const ops = await Promise.all(ranges.map((x) => getMembers(guild_id, x))); // TODO: unsubscribe member_events that are not in op.members diff --git a/gateway/src/opcodes/VoiceStateUpdate.ts b/gateway/src/opcodes/VoiceStateUpdate.ts
index 321e6b17..7f7db9b0 100644 --- a/gateway/src/opcodes/VoiceStateUpdate.ts +++ b/gateway/src/opcodes/VoiceStateUpdate.ts
@@ -84,7 +84,7 @@ export async function onVoiceStateUpdate(this: WebSocket, data: Payload) { //If it's null it means that we are leaving the channel and this event is not needed if (voiceState.channel_id !== null) { - const guild = await Guild.findOne({ id: voiceState.guild_id }); + const guild = await Guild.findOne({ where: { id: voiceState.guild_id } }); const regions = Config.get().regions; let guildRegion: Region; if (guild && guild.region) {