Open conversation on receiving a message w/ errors

This commit is contained in:
lilia 2015-02-18 12:01:58 -08:00
parent 955ef60292
commit 296dae544d

View file

@ -96,11 +96,13 @@
if (e.name === 'IncomingIdentityKeyError') {
e.args.push(message.id);
message.save({ errors : [e] }).then(function() {
extension.trigger('message', message); // notify frontend listeners
extension.trigger('message', message);
openConversation(conversation.id);
});
} else if (e.message === 'Bad MAC') {
message.save({ errors : [ _.pick(e, ['name', 'message'])]}).then(function() {
extension.trigger('message', message); // notify frontend listeners
extension.trigger('message', message);
openConversation(conversation.id);
});
} else {
console.log(e);