Generalize keepMutedChatsArchived check
This commit is contained in:
parent
f3b68677b3
commit
dff924c0c5
3 changed files with 27 additions and 7 deletions
|
@ -71,6 +71,7 @@ import {
|
|||
import { missingCaseError } from '../util/missingCaseError';
|
||||
import { sniffImageMimeType } from '../util/sniffImageMimeType';
|
||||
import { isValidE164 } from '../util/isValidE164';
|
||||
import { canConversationBeUnarchived } from '../util/canConversationBeUnarchived';
|
||||
import type { MIMEType } from '../types/MIME';
|
||||
import { IMAGE_JPEG, IMAGE_GIF, IMAGE_WEBP } from '../types/MIME';
|
||||
import { UUID, UUIDKind } from '../types/UUID';
|
||||
|
@ -3274,7 +3275,7 @@ export class ConversationModel extends window.Backbone
|
|||
this.trigger('newmessage', model);
|
||||
void this.updateUnread();
|
||||
|
||||
if (this.get('isArchived')) {
|
||||
if (canConversationBeUnarchived(this.attributes)) {
|
||||
this.setArchived(false);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue