Add removeMessage function to conversation

pull/451/head
Beaudan Brown 6 years ago
parent 6392c77952
commit 5a70d88747

@ -2288,6 +2288,16 @@
});
},
removeMessage(messageId) {
const message = this.messageCollection.models.find(
msg => msg.id === messageId
);
if (message) {
message.trigger('unload');
this.messageCollection.remove(messageId);
}
},
deleteMessages() {
Whisper.events.trigger('showConfirmationDialog', {
message: i18n('deleteConversationConfirmation'),

@ -357,9 +357,6 @@
onDestroy() {
this.cleanup();
},
deleteMessage() {
this.trigger('delete', this);
},
async cleanup() {
MessageController.unregister(this.id);
this.unload();

Loading…
Cancel
Save