diff --git a/src/webpage/localuser.ts b/src/webpage/localuser.ts index 0071a76..36c25e2 100644 --- a/src/webpage/localuser.ts +++ b/src/webpage/localuser.ts @@ -369,7 +369,7 @@ class Localuser { } } guildFolders: guildFolder[] = []; - unknownRead = new Map(); + readonly unknownRead = new Map(); async gottenReady(ready: readyjson): Promise { await I18n.done; this.errorBackoff = 0; @@ -458,7 +458,7 @@ class Localuser { this.pingEndpoint(); } - inrelation = new Set(); + readonly inrelation = new Set(); outoffocus(): void { const servers = document.getElementById("guildRail") as HTMLDivElement; servers.innerHTML = ""; @@ -721,7 +721,7 @@ class Localuser { await promise; console.warn("huh"); } - interNonceMap = new Map(); + readonly interNonceMap = new Map(); registerInterNonce(nonce: string, thing: Message) { this.interNonceMap.set(nonce, thing); } @@ -737,7 +737,7 @@ class Localuser { this.handleTrace(e.trace); }); } - relChangeUpdateMap = new Map void)[]>(); + readonly relChangeUpdateMap = new Map void)[]>(); async relationChange(id: string): Promise { const arr = this.relChangeUpdateMap.get(id) || []; const {promise, resolve} = Promise.withResolvers(); @@ -1492,7 +1492,7 @@ class Localuser { console.log("failed with", insts, this.info.wellknown); return this.info.wellknown; } - roleListMap = new WeakMap< + readonly roleListMap = new WeakMap< HTMLDivElement, { role: Role | "offline" | "online"; @@ -1799,7 +1799,7 @@ class Localuser { channels.appendChild(html); return guild; } - dragMap = new WeakMap< + readonly dragMap = new WeakMap< HTMLElement, | Guild | { @@ -2834,7 +2834,7 @@ class Localuser { } }, { - fetchURL: this.info.api + "/users/@me/mfa/totp/enable/", + fetchURL: this.info.api + "/users/@me/mfa/totp/enable", headers: this.headers, }, ); @@ -3851,7 +3851,7 @@ class Localuser { } { const instanceInfo = settings.addButton(I18n.instanceInfo.name()); - fetch(this.info.api + "/policies/instance/") + fetch(this.info.api + "/policies/instance") .then((_) => _.json()) .then((body) => { const json = body as { @@ -5038,7 +5038,7 @@ class Localuser { [`BlobmojiCompat.${isFirefox ? "woff2" : "ttf"}`, "Blobmoji"], ] as const; } - getMemberMap = new Map>(); + readonly getMemberMap = new Map>(); async getMember(id: string, guildid: string): Promise { const user = this.userMap.get(id); const guild = this.guilds.get(guildid) as Guild;