enqueueMessageForSend: Capture storage service change on unarchive
This commit is contained in:
parent
06b606cec3
commit
1dc27a6144
1 changed files with 10 additions and 5 deletions
|
@ -4008,9 +4008,11 @@ export class ConversationModel extends window.Backbone
|
|||
const { clearUnreadMetrics } = window.reduxActions.conversations;
|
||||
clearUnreadMetrics(this.id);
|
||||
|
||||
const enableProfileSharing = Boolean(
|
||||
const enabledProfileSharing = Boolean(
|
||||
mandatoryProfileSharingEnabled && !this.get('profileSharing')
|
||||
);
|
||||
const unarchivedConversation = Boolean(this.get('isArchived'));
|
||||
|
||||
this.doAddSingleMessage(model, { isJustSent: true });
|
||||
|
||||
const draftProperties = dontClearDraft
|
||||
|
@ -4024,15 +4026,18 @@ export class ConversationModel extends window.Backbone
|
|||
|
||||
this.set({
|
||||
...draftProperties,
|
||||
...(enableProfileSharing ? { profileSharing: true } : {}),
|
||||
...(enabledProfileSharing ? { profileSharing: true } : {}),
|
||||
...this.incrementSentMessageCount({ dry: true }),
|
||||
active_at: now,
|
||||
timestamp: now,
|
||||
isArchived: false,
|
||||
...(unarchivedConversation ? { isArchived: false } : {}),
|
||||
});
|
||||
|
||||
if (enableProfileSharing) {
|
||||
this.captureChange('mandatoryProfileSharing');
|
||||
if (enabledProfileSharing) {
|
||||
this.captureChange('enqueueMessageForSend/mandatoryProfileSharing');
|
||||
}
|
||||
if (unarchivedConversation) {
|
||||
this.captureChange('enqueueMessageForSend/unarchive');
|
||||
}
|
||||
|
||||
extraReduxActions?.();
|
||||
|
|
Loading…
Reference in a new issue