diff options
author | Puyodead1 <puyodead@proton.me> | 2022-12-20 23:18:52 -0500 |
---|---|---|
committer | Puyodead1 <puyodead@proton.me> | 2022-12-20 23:25:20 -0500 |
commit | 8a28dd467540526d133972907d39f2a1eded929b (patch) | |
tree | a10f5e4e7ac34d1385c971c1f6b96ef96d1fa9dd /src/gateway | |
parent | Fix the roles bug (diff) | |
download | server-8a28dd467540526d133972907d39f2a1eded929b.tar.xz |
Client: update to canary 165341
Diffstat (limited to 'src/gateway')
-rw-r--r-- | src/gateway/opcodes/Identify.ts | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/gateway/opcodes/Identify.ts b/src/gateway/opcodes/Identify.ts index 5f569fee..69a60880 100644 --- a/src/gateway/opcodes/Identify.ts +++ b/src/gateway/opcodes/Identify.ts @@ -22,6 +22,8 @@ import { IdentifySchema, DefaultUserGuildSettings, UserGuildSettings, + ReadyGuildDTO, + Guild, } from "@fosscord/util"; import { Send } from "../util/Send"; import { CLOSECODES, OPCODES } from "../util/Constants"; @@ -255,17 +257,17 @@ export async function onIdentify(this: WebSocket, data: Payload) { }; const d: ReadyEventData = { - v: 8, + v: 9, application: { id: application?.id ?? '', flags: application?.flags ?? 0 }, //TODO: check this code! user: privateUser, user_settings: user.settings, // @ts-ignore guilds: guilds.map((x) => { - // @ts-ignore - x.guild_hashes = {}; // @ts-ignore - x.guild_scheduled_events = []; // @ts-ignore - x.threads = []; - return x; + return { + ...new ReadyGuildDTO(x as Guild & { joined_at: Date }).toJSON(), + guild_hashes: {}, + joined_at: x.joined_at + }; }), guild_experiments: [], // TODO geo_ordered_rtc_regions: [], // TODO @@ -298,8 +300,6 @@ export async function onIdentify(this: WebSocket, data: Payload) { merged_members: merged_members, // shard // TODO: only for user sharding sessions: [], // TODO: - presences: [], // TODO: - tutorial: null, }; // TODO: send real proper data structure |