From f6f550f10a7a78d5495a1ab44a1ba5aeb3889638 Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 4 Sep 2021 17:59:29 +0200 Subject: :arrow_up: update test client --- api/client_test/index.html | 8 ++++---- api/src/routes/auth/register.ts | 2 +- gateway/src/opcodes/Identify.ts | 4 +++- gateway/src/schema/Identify.ts | 2 +- util/src/entities/Guild.ts | 1 - util/src/entities/User.ts | 2 +- 6 files changed, 10 insertions(+), 9 deletions(-) diff --git a/api/client_test/index.html b/api/client_test/index.html index 6ca8647e..ac66df06 100644 --- a/api/client_test/index.html +++ b/api/client_test/index.html @@ -45,9 +45,9 @@ `{"trace":false,"canary":false,"logGatewayEvents":true,"logOverlayEvents":true,"logAnalyticsEvents":true,"sourceMapsEnabled":false,"axeEnabled":false}` ); - - - - + + + + diff --git a/api/src/routes/auth/register.ts b/api/src/routes/auth/register.ts index 19c9c70f..a9518e91 100644 --- a/api/src/routes/auth/register.ts +++ b/api/src/routes/auth/register.ts @@ -205,7 +205,7 @@ router.post( hash: adjusted_password, valid_tokens_since: new Date() }, - settings: defaultSettings, + settings: { ...defaultSettings, locale: req.language || "en-US" }, fingerprints: [] }).save(); diff --git a/gateway/src/opcodes/Identify.ts b/gateway/src/opcodes/Identify.ts index adfd98da..95db7f3d 100644 --- a/gateway/src/opcodes/Identify.ts +++ b/gateway/src/opcodes/Identify.ts @@ -147,7 +147,9 @@ export async function onIdentify(this: WebSocket, data: Payload) { // @ts-ignore guilds: guilds.map((x) => { // @ts-ignore - x.guild_hashes = {}; + x.guild_hashes = {}; // @ts-ignore + x.guild_scheduled_events = []; // @ts-ignore + x.threads = []; return x; }), guild_experiments: [], // TODO diff --git a/gateway/src/schema/Identify.ts b/gateway/src/schema/Identify.ts index cbd6630a..0835ddc7 100644 --- a/gateway/src/schema/Identify.ts +++ b/gateway/src/schema/Identify.ts @@ -5,7 +5,7 @@ export const IdentifySchema = { $intents: BigInt, // discord uses a Integer for bitfields we use bigints tho. | instanceOf will automatically convert the Number to a BigInt $properties: Object, // { - // // bruh discord really uses $ in the property key for bots, so we need to double prefix it, because instanceOf treats $ (prefix) as a optional key + // // discord uses $ in the property key for bots, so we need to double prefix it, because instanceOf treats $ (prefix) as a optional key // $os: String, // $os_arch: String, // $browser: String, diff --git a/util/src/entities/Guild.ts b/util/src/entities/Guild.ts index 029a1b0b..7b5d2908 100644 --- a/util/src/entities/Guild.ts +++ b/util/src/entities/Guild.ts @@ -16,7 +16,6 @@ import { Webhook } from "./Webhook"; // TODO: guild_scheduled_events // TODO: stage_instances // TODO: threads -// TODO: description // TODO: categories: // [{ // "id": 16, diff --git a/util/src/entities/User.ts b/util/src/entities/User.ts index 63ef41a2..f44b37b3 100644 --- a/util/src/entities/User.ts +++ b/util/src/entities/User.ts @@ -185,7 +185,7 @@ export const defaultSettings: UserSettings = { guild_positions: [], inline_attachment_media: true, inline_embed_media: true, - locale: "en", + locale: "en-US", message_display_compact: false, native_phone_integration_enabled: true, render_embeds: true, -- cgit 1.4.1