Include and process destinationPniIdentityKey

This commit is contained in:
Fedor Indutny 2024-03-11 18:08:38 -07:00 committed by GitHub
parent 711e321d16
commit e031d136a1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 238 additions and 214 deletions

View file

@ -2027,9 +2027,12 @@ export class ConversationModel extends window.Backbone
incrementSentMessageCount({ dry = false }: { dry?: boolean } = {}):
| Partial<ConversationAttributesType>
| undefined {
const needsTitleTransition =
hasNumberTitle(this.attributes) || hasUsernameTitle(this.attributes);
const update = {
messageCount: (this.get('messageCount') || 0) + 1,
sentMessageCount: (this.get('sentMessageCount') || 0) + 1,
...(needsTitleTransition ? { needsTitleTransition: true } : {}),
};
if (dry) {
@ -3719,13 +3722,10 @@ export class ConversationModel extends window.Backbone
};
const isEditMessage = Boolean(message.get('editHistory'));
const needsTitleTransition =
hasNumberTitle(this.attributes) || hasUsernameTitle(this.attributes);
this.set({
...draftProperties,
...(enabledProfileSharing ? { profileSharing: true } : {}),
...(needsTitleTransition ? { needsTitleTransition: true } : {}),
...(dontAddMessage
? {}
: this.incrementSentMessageCount({ dry: true })),