Move error messages to message detail view
Change how message errors are rendered. Errors associated with a number will be shown under that number in the detail view rather than piling up in the message bubble. // FREEBIE
This commit is contained in:
parent
9a63703340
commit
929c16090b
6 changed files with 64 additions and 23 deletions
|
@ -58,6 +58,9 @@
|
|||
if (this.isIncoming() && this.hasKeyConflicts()) {
|
||||
return 'Received message with unknown identity key.';
|
||||
}
|
||||
if (this.isIncoming() && this.hasErrors()) {
|
||||
return 'Error decrypting incoming message.';
|
||||
}
|
||||
|
||||
return this.get('body');
|
||||
},
|
||||
|
@ -111,6 +114,9 @@
|
|||
isOutgoing: function() {
|
||||
return this.get('type') === 'outgoing';
|
||||
},
|
||||
hasErrors: function() {
|
||||
return _.size(this.get('errors')) > 0;
|
||||
},
|
||||
hasKeyConflicts: function() {
|
||||
return _.any(this.get('errors'), function(e) {
|
||||
return (e.name === 'IncomingIdentityKeyError' ||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue