diff options
author | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2023-07-31 19:42:27 +1000 |
---|---|---|
committer | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2023-07-31 19:42:27 +1000 |
commit | 4c0b1391b19cd55127350aa8605362e2799d5407 (patch) | |
tree | 948e684e374b5fa748bb3961e4a5e2fb16edd120 /src/gateway | |
parent | * call toJSON of keys in gateway when using erlpack (diff) | |
download | server-4c0b1391b19cd55127350aa8605362e2799d5407.tar.xz |
send empty READY_SUPPLEMENTAL for client compatibility
Diffstat (limited to 'src/gateway')
-rw-r--r-- | src/gateway/opcodes/Identify.ts | 21 |
1 files changed, 20 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 |