Remove conversation from left pane on 'delete messages' (#1807)

This commit is contained in:
Scott Nonnenberg 2017-11-21 16:37:58 -08:00 committed by GitHub
parent abb83a895e
commit 87d8ec723a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 24 additions and 5 deletions

View file

@ -984,8 +984,14 @@
}).then(function() {
var models = this.messageCollection.models;
this.messageCollection.reset([]);
_.each(models, function(message) { message.destroy(); });
this.save({lastMessage: null, timestamp: null}); // archive
_.each(models, function(message) {
message.destroy();
});
this.save({
lastMessage: null,
timestamp: null,
active_at: null,
});
}.bind(this));
},