diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 3f633791..9350bbf5 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -280,5 +280,9 @@ "mediaMessage": { "message": "Media message", "description": "Description of a message that has an attachment and no text, displayed in the conversation list as a preview." + }, + "unregisteredUser": { + "message": "Number is not registered", + "description": "Error message displayed when sending to an unregistered user." } } diff --git a/js/views/message_view.js b/js/views/message_view.js index 43b58c71..f6146f7b 100644 --- a/js/views/message_view.js +++ b/js/views/message_view.js @@ -11,7 +11,12 @@ templateName: 'error-icon', className: 'error-icon-container', render_attributes: function() { - return { message: this.model && this.model.message }; + var message; + if (this.model.name === 'UnregisteredUserError') { + message = i18n('unregisteredUser'); + this.$el.addClass('unregistered-user-error'); + } + return { message: message }; } }); var NetworkErrorView = Whisper.View.extend({