Display a default message for incoming message errors
An exception to the previous commit, for incoming messages we should not show a mysterious empty bubble. Instead there is some generic non-technical error message. // FREEBIE
This commit is contained in:
parent
929c16090b
commit
a802322d44
2 changed files with 8 additions and 3 deletions
|
@ -59,7 +59,7 @@
|
|||
return 'Received message with unknown identity key.';
|
||||
}
|
||||
if (this.isIncoming() && this.hasErrors()) {
|
||||
return 'Error decrypting incoming message.';
|
||||
return 'Error handling incoming message.';
|
||||
}
|
||||
|
||||
return this.get('body');
|
||||
|
|
|
@ -34,7 +34,12 @@
|
|||
},
|
||||
renderErrors: function() {
|
||||
var errors = this.model.get('errors');
|
||||
if (_.size(errors) > 0) { this.$el.addClass('error'); }
|
||||
if (_.size(errors) > 0) {
|
||||
this.$el.addClass('error');
|
||||
if (this.model.isIncoming()) {
|
||||
this.$('.content').text(this.model.getDescription()).addClass('error-message');
|
||||
}
|
||||
}
|
||||
},
|
||||
renderControl: function() {
|
||||
if (this.model.isEndSession() || this.model.isGroupUpdate()) {
|
||||
|
@ -63,8 +68,8 @@
|
|||
|
||||
this.renderSent();
|
||||
this.renderDelivered();
|
||||
this.renderErrors();
|
||||
this.renderControl();
|
||||
this.renderErrors();
|
||||
|
||||
this.$('.attachments').append(
|
||||
this.model.get('attachments').map(function(attachment) {
|
||||
|
|
Loading…
Reference in a new issue