Ensure that non-ACIs are excluded from the blocked UUIDs list

This commit is contained in:
Scott Nonnenberg 2024-10-10 09:20:57 +10:00 committed by GitHub
parent 42cc5e0013
commit adcf2212e5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 24 additions and 6 deletions

View file

@ -930,7 +930,7 @@ export class ConversationModel extends window.Backbone
const wasBlocked = this.isBlocked();
const serviceId = this.getServiceId();
if (serviceId) {
if (serviceId && isAciString(serviceId)) {
drop(window.storage.blocked.addBlockedServiceId(serviceId));
blocked = true;
}
@ -962,7 +962,7 @@ export class ConversationModel extends window.Backbone
const wasBlocked = this.isBlocked();
const serviceId = this.getServiceId();
if (serviceId) {
if (serviceId && isAciString(serviceId)) {
drop(window.storage.blocked.removeBlockedServiceId(serviceId));
unblocked = true;
}
@ -2344,6 +2344,10 @@ export class ConversationModel extends window.Backbone
ourAci: window.textsecure.storage.user.getCheckedAci(),
forceSave: true,
});
if (!this.get('active_at')) {
this.set({ active_at: Date.now() });
await DataWriter.updateConversation(this.attributes);
}
window.MessageCache.toMessageAttributes(message);
this.trigger('newmessage', message);
drop(this.updateLastMessage());