Fix check for universal timer notification

This commit is contained in:
Fedor Indutny 2021-06-02 13:55:10 -07:00 committed by GitHub
parent 0f4a1d6e28
commit a6ce00ff37
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 49 additions and 3 deletions

View file

@ -2797,12 +2797,11 @@ export class ConversationModel extends window.Backbone
return;
}
if (this.get('pendingUniversalTimer') || this.get('expireTimer')) {
if (await window.Signal.Data.hasUserInitiatedMessages(this.get('id'))) {
return;
}
const activeAt = this.get('active_at');
if (activeAt) {
if (this.get('pendingUniversalTimer') || this.get('expireTimer')) {
return;
}
@ -2824,6 +2823,9 @@ export class ConversationModel extends window.Backbone
const message = window.MessageController.getById(notificationId);
if (message) {
message.cleanup();
window.Signal.Data.removeMessage(message.id, {
Message: window.Whisper.Message,
});
}
if (this.get('expireTimer')) {