summary refs log tree commit diff
path: root/gateway/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--gateway/src/opcodes/Identify.ts2
-rw-r--r--gateway/src/opcodes/LazyRequest.ts3
-rw-r--r--gateway/src/opcodes/PresenceUpdate.ts3
-rw-r--r--gateway/src/opcodes/VoiceStateUpdate.ts2
-rw-r--r--gateway/src/schema/VoiceStateUpdateSchema.ts15
-rw-r--r--util/src/schemas/ActivitySchema.ts (renamed from gateway/src/schema/Activity.ts)0
-rw-r--r--util/src/schemas/IdentifySchema.ts (renamed from gateway/src/schema/Identify.ts)2
-rw-r--r--util/src/schemas/LazyRequestSchema.ts (renamed from gateway/src/schema/LazyRequest.ts)0
8 files changed, 5 insertions, 22 deletions
diff --git a/gateway/src/opcodes/Identify.ts b/gateway/src/opcodes/Identify.ts

index ce4385a3..e62c1570 100644 --- a/gateway/src/opcodes/Identify.ts +++ b/gateway/src/opcodes/Identify.ts
@@ -19,12 +19,12 @@ import { MemberPrivateProjection, PresenceUpdateEvent, UserSettings, + IdentifySchema, } from "@fosscord/util"; import { Send } from "../util/Send"; import { CLOSECODES, OPCODES } from "../util/Constants"; import { genSessionId } from "../util/SessionUtils"; import { setupListener } from "../listener/listener"; -import { IdentifySchema } from "../schema/Identify"; // import experiments from "./experiments.json"; const experiments: any = []; import { check } from "./instanceOf"; diff --git a/gateway/src/opcodes/LazyRequest.ts b/gateway/src/opcodes/LazyRequest.ts
index 5ba65cdd..cd0586de 100644 --- a/gateway/src/opcodes/LazyRequest.ts +++ b/gateway/src/opcodes/LazyRequest.ts
@@ -1,5 +1,4 @@ -import { getPermission, listenEvent, Member, Role, getOrInitialiseDatabase } from "@fosscord/util"; -import { LazyRequest } from "../schema/LazyRequest"; +import { getPermission, listenEvent, Member, Role, getOrInitialiseDatabase, LazyRequest } from "@fosscord/util"; import { Send } from "../util/Send"; import { OPCODES } from "../util/Constants"; import { WebSocket, Payload, handlePresenceUpdate } from "@fosscord/gateway"; diff --git a/gateway/src/opcodes/PresenceUpdate.ts b/gateway/src/opcodes/PresenceUpdate.ts
index 415df6ee..f31c9161 100644 --- a/gateway/src/opcodes/PresenceUpdate.ts +++ b/gateway/src/opcodes/PresenceUpdate.ts
@@ -1,6 +1,5 @@ import { WebSocket, Payload } from "@fosscord/gateway"; -import { emitEvent, PresenceUpdateEvent, Session, User } from "@fosscord/util"; -import { ActivitySchema } from "../schema/Activity"; +import { ActivitySchema, emitEvent, PresenceUpdateEvent, Session, User } from "@fosscord/util"; import { check } from "./instanceOf"; export async function onPresenceUpdate(this: WebSocket, { d }: Payload) { diff --git a/gateway/src/opcodes/VoiceStateUpdate.ts b/gateway/src/opcodes/VoiceStateUpdate.ts
index 845a75c0..73f73565 100644 --- a/gateway/src/opcodes/VoiceStateUpdate.ts +++ b/gateway/src/opcodes/VoiceStateUpdate.ts
@@ -1,4 +1,3 @@ -import { VoiceStateUpdateSchema } from "../schema/VoiceStateUpdateSchema"; import { Payload, WebSocket } from "@fosscord/gateway"; import { genVoiceToken } from "../util/SessionUtils"; import { check } from "./instanceOf"; @@ -10,6 +9,7 @@ import { VoiceServerUpdateEvent, VoiceState, VoiceStateUpdateEvent, + VoiceStateUpdateSchema, } from "@fosscord/util"; import { OrmUtils } from "@fosscord/util"; import { Region } from "@fosscord/util/src/config"; diff --git a/gateway/src/schema/VoiceStateUpdateSchema.ts b/gateway/src/schema/VoiceStateUpdateSchema.ts deleted file mode 100644
index 9efa191e..00000000 --- a/gateway/src/schema/VoiceStateUpdateSchema.ts +++ /dev/null
@@ -1,15 +0,0 @@ -export const VoiceStateUpdateSchema = { - $guild_id: String, - $channel_id: String, - self_mute: Boolean, - self_deaf: Boolean, - self_video: Boolean, -}; - -export interface VoiceStateUpdateSchema { - guild_id?: string; - channel_id?: string; - self_mute: boolean; - self_deaf: boolean; - self_video: boolean; -} diff --git a/gateway/src/schema/Activity.ts b/util/src/schemas/ActivitySchema.ts
index e18f66c8..e18f66c8 100644 --- a/gateway/src/schema/Activity.ts +++ b/util/src/schemas/ActivitySchema.ts
diff --git a/gateway/src/schema/Identify.ts b/util/src/schemas/IdentifySchema.ts
index 21141321..8f95c6a0 100644 --- a/gateway/src/schema/Identify.ts +++ b/util/src/schemas/IdentifySchema.ts
@@ -1,4 +1,4 @@ -import { ActivitySchema } from "./Activity"; +import { ActivitySchema } from "./ActivitySchema"; export const IdentifySchema = { token: String, diff --git a/gateway/src/schema/LazyRequest.ts b/util/src/schemas/LazyRequestSchema.ts
index 1fe658bb..1fe658bb 100644 --- a/gateway/src/schema/LazyRequest.ts +++ b/util/src/schemas/LazyRequestSchema.ts