Skip to content

Commit e4b3090

Browse files
authored
Merge branch 'develop' into duplicate-image
2 parents 736f598 + 28e714d commit e4b3090

File tree

18 files changed

+40
-44
lines changed

18 files changed

+40
-44
lines changed

app/containers/MessageErrorActions.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ const MessageErrorActions = forwardRef<IMessageErrorActions, { tmid?: string }>(
7171
}
7272
}
7373
await db.write(async () => {
74-
await db.batch(...deleteBatch);
74+
await db.batch(deleteBatch);
7575
});
7676
} catch (e) {
7777
log(e);

app/lib/encryption/encryption.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ class Encryption {
332332
)) as (TThreadModel | TThreadMessageModel)[];
333333

334334
await db.write(async () => {
335-
await db.batch(...toDecrypt);
335+
await db.batch(toDecrypt);
336336
});
337337
} catch (e) {
338338
log(e);
@@ -368,7 +368,7 @@ class Encryption {
368368
);
369369

370370
await db.write(async () => {
371-
await db.batch(...subsEncrypted);
371+
await db.batch(subsEncrypted);
372372
});
373373
} catch (e) {
374374
log(e);
@@ -417,7 +417,7 @@ class Encryption {
417417
}
418418

419419
try {
420-
const batch: (Model | null | void | false)[] = [];
420+
const batch: Model[] = [];
421421
// If the subscription doesn't exists yet
422422
if (!subRecord) {
423423
// Let's create the subscription with the data received
@@ -444,7 +444,7 @@ class Encryption {
444444
// If batch has some operation
445445
if (batch.length) {
446446
await db.write(async () => {
447-
await db.batch(...batch);
447+
await db.batch(batch);
448448
});
449449
}
450450
} catch {

app/lib/methods/getCustomEmojis.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ const updateEmojis = async ({ update = [], remove = [], allRecords }: IUpdateEmo
6262

6363
try {
6464
await db.write(async () => {
65-
await db.batch(...emojisToCreate, ...emojisToUpdate, ...emojisToDelete);
65+
await db.batch(emojisToCreate, ...emojisToUpdate, ...emojisToDelete);
6666
});
6767
return true;
6868
} catch (e) {

app/lib/methods/getPermissions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ const updatePermissions = async ({
147147

148148
try {
149149
await db.write(async () => {
150-
await db.batch(...batch);
150+
await db.batch(batch);
151151
});
152152
return true;
153153
} catch (e) {

app/lib/methods/getRoles.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ export function getRoles(): Promise<void> {
114114
const allRecords: Model[] = [...rolesToCreate, ...rolesToUpdate];
115115

116116
try {
117-
await db.batch(...allRecords);
117+
await db.batch(allRecords);
118118
} catch (e) {
119119
log(e);
120120
}

app/lib/methods/getSettings.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ export async function getSettings(): Promise<void> {
225225
const allRecords = [...settingsToCreateMapped, ...settingsToUpdateMapped];
226226

227227
try {
228-
await db.batch(...allRecords);
228+
await db.batch(allRecords);
229229
} catch (e) {
230230
log(e);
231231
}

app/lib/methods/getSlashCommands.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export function getSlashCommands() {
6363
const allRecords = [...slashCommandsToCreate, ...slashCommandsToUpdate, ...slashCommandsToDelete];
6464

6565
try {
66-
await db.batch(...allRecords);
66+
await db.batch(allRecords);
6767
} catch (e) {
6868
log(e);
6969
}

app/lib/methods/handleMediaDownload.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ const persistMessage = async (messageId: string, uri: string, encryption: boolea
245245
}
246246
if (batch.length) {
247247
await db.write(async () => {
248-
await db.batch(...batch);
248+
await db.batch(batch);
249249
});
250250
}
251251
};

app/lib/methods/loadThreadMessages.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export function loadThreadMessages({ tmid, rid }: { tmid: string; rid: string })
7373
});
7474

7575
await db.write(async () => {
76-
await db.batch(...threadMessagesToCreate, ...threadMessagesToUpdate);
76+
await db.batch(threadMessagesToCreate, ...threadMessagesToUpdate);
7777
});
7878
} catch (e) {
7979
log(e);

app/lib/methods/logout.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export async function removeServerData({ server }: { server: string }): Promise<
5858
const serverRecord = await serverCollection.find(server);
5959
batch.push(serverRecord.prepareDestroyPermanently());
6060

61-
await serversDB.write(() => serversDB.batch(...batch));
61+
await serversDB.write(() => serversDB.batch(batch));
6262
await removeSharedCredentials({ server });
6363
await removeServerKeys({ server, userId });
6464
} catch (e) {

0 commit comments

Comments
 (0)