Types, better-sqlite3, and worker_threads for our sqlite

This commit is contained in:
Fedor Indutny 2021-04-05 15:18:19 -07:00 committed by Josh Perez
parent fc3004a183
commit 37c8c1727f
24 changed files with 2823 additions and 3121 deletions

View file

@ -1388,7 +1388,7 @@ export class ConversationModel extends window.Backbone.Model<
profileSharing: this.get('profileSharing'),
publicParams: this.get('publicParams'),
secretParams: this.get('secretParams'),
sharedGroupNames: this.get('sharedGroupNames')!,
sharedGroupNames: this.get('sharedGroupNames'),
shouldShowDraft,
sortedGroupMembers,
timestamp,
@ -2574,7 +2574,7 @@ export class ConversationModel extends window.Backbone.Model<
sent_at: now,
received_at: window.Signal.Util.incrementMessageCounter(),
received_at_ms: now,
unread: true,
unread: 1,
changedId: conversationId || this.id,
profileChange,
// TODO: DESKTOP-722

View file

@ -1745,7 +1745,7 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
body: '',
bodyRanges: undefined,
attachments: [],
quote: null,
quote: undefined,
contact: [],
sticker: null,
preview: [],
@ -2034,7 +2034,7 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
return null;
}
this.set({ errors: null });
this.set({ errors: undefined });
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const conversation = this.getConversation()!;
@ -3934,7 +3934,7 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
this.clearNotifications(reaction.get('fromId'));
}
const newCount = this.get('reactions').length;
const newCount = (this.get('reactions') || []).length;
window.log.info(
`Done processing reaction for message ${messageId}. Went from ${count} to ${newCount} reactions.`
);