summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2023-07-31 19:42:27 +1000
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2023-07-31 19:42:27 +1000
commit4c0b1391b19cd55127350aa8605362e2799d5407 (patch)
tree948e684e374b5fa748bb3961e4a5e2fb16edd120 /src
parent* call toJSON of keys in gateway when using erlpack (diff)
downloadserver-4c0b1391b19cd55127350aa8605362e2799d5407.tar.xz
send empty READY_SUPPLEMENTAL for client compatibility
Diffstat (limited to 'src')
-rw-r--r--src/gateway/opcodes/Identify.ts21
-rw-r--r--src/util/interfaces/Event.ts1
2 files changed, 21 insertions, 1 deletions
diff --git a/src/gateway/opcodes/Identify.ts b/src/gateway/opcodes/Identify.ts

index 0f91df3e..bab52279 100644 --- a/src/gateway/opcodes/Identify.ts +++ b/src/gateway/opcodes/Identify.ts
@@ -53,6 +53,7 @@ import { DMChannel, GuildOrUnavailable, Recipient, + OPCodes, } from "@spacebar/util"; import { check } from "./instanceOf"; @@ -441,7 +442,25 @@ export async function onIdentify(this: WebSocket, data: Payload) { ), ); - //TODO send READY_SUPPLEMENTAL + // TODO: ready supplemental + await Send(this, { + op: OPCodes.DISPATCH, + t: EVENTEnum.ReadySupplemental, + s: this.sequence++, + d: { + merged_presences: { + guilds: [], + friends: [], + }, + // these merged members seem to be all users currently in vc in your guilds + merged_members: [], + lazy_private_channels: [], + guilds: [], // { voice_states: [], id: string, embedded_activities: [] } + // embedded_activities are users currently in an activity? + disclose: ["pomelo"], + }, + }); + //TODO send GUILD_MEMBER_LIST_UPDATE //TODO send VOICE_STATE_UPDATE to let the client know if another device is already connected to a voice channel diff --git a/src/util/interfaces/Event.ts b/src/util/interfaces/Event.ts
index 7ddb763d..deb54428 100644 --- a/src/util/interfaces/Event.ts +++ b/src/util/interfaces/Event.ts
@@ -583,6 +583,7 @@ export type EventData = export enum EVENTEnum { Ready = "READY", + ReadySupplemental = "READY_SUPPLEMENTAL", ChannelCreate = "CHANNEL_CREATE", ChannelUpdate = "CHANNEL_UPDATE", ChannelDelete = "CHANNEL_DELETE",