mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 12:19:41 +00:00
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:
@@ -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' ||
|
||||
|
||||
Reference in New Issue
Block a user