Conform more of the codebase to strictNullChecks + noImplicitAny (#11179)

This commit is contained in:
Michael Telatynski 2023-07-04 14:49:27 +01:00 committed by GitHub
parent 7c211b0587
commit a294ba2ad4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 104 additions and 88 deletions

View file

@ -327,7 +327,7 @@ function registerAsGuest(hsUrl: string, isUrl?: string, defaultDeviceDisplayName
{
userId: creds.user_id,
deviceId: creds.device_id,
accessToken: creds.access_token,
accessToken: creds.access_token!,
homeserverUrl: hsUrl,
identityServerUrl: isUrl,
guest: true,
@ -920,10 +920,8 @@ async function clearStorage(opts?: { deleteEverything?: boolean }): Promise<void
// now restore those invites and registration time
if (!opts?.deleteEverything) {
pendingInvites.forEach((i) => {
const roomId = i.roomId;
delete i.roomId; // delete to avoid confusing the store
ThreepidInviteStore.instance.storeInvite(roomId, i);
pendingInvites.forEach(({ roomId, ...invite }) => {
ThreepidInviteStore.instance.storeInvite(roomId, invite);
});
if (registrationTime) {