mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 04:09:49 +00:00
Add support for deleting a conversation
Note that the conversation record is not actually destroyed, merely marked inactive, preserving the contact name, photo, etc...
This commit is contained in:
@@ -89,6 +89,13 @@
|
||||
options = options || {};
|
||||
options.conditions = {conversationId: this.id };
|
||||
return this.messageCollection.fetch(options);
|
||||
},
|
||||
|
||||
destroyMessages: function() {
|
||||
var models = this.messageCollection.models;
|
||||
this.messageCollection.reset([]);
|
||||
_.each(models, function(message) { message.destroy(); });
|
||||
return this.save({active: false});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user