diff --git a/js/models/conversations.js b/js/models/conversations.js index 350f15b2d..c03771c86 100644 --- a/js/models/conversations.js +++ b/js/models/conversations.js @@ -80,7 +80,6 @@ verified: textsecure.storage.protocol.VerifiedStatus.DEFAULT, isFriend: false, keyExchangeCompleted: false, - blockInput: false, unlockTimestamp: null, // Timestamp used for expiring friend requests. }; }, @@ -1094,31 +1093,21 @@ return true; }); }, - async updateBlockInput(blockInput) { - if (this.get('blockInput') === blockInput) return; - this.set({ blockInput }); - await window.Signal.Data.updateConversation(this.id, this.attributes, { - Conversation: Whisper.Conversation, - }); - }, async updateTextInputState() { // Check if we need to disable the text field if (!this.isFriend()) { // Disable the input if we're waiting for friend request approval const waiting = await this.waitingForFriendRequestApproval(); if (waiting) { - await this.updateBlockInput(true); this.trigger('disable:input', true); this.trigger('change:placeholder', 'disabled'); return; } // Tell the user to introduce themselves - await this.updateBlockInput(false); this.trigger('disable:input', false); this.trigger('change:placeholder', 'friend-request'); return; } - await this.updateBlockInput(false); this.trigger('disable:input', false); this.trigger('change:placeholder', 'chat'); }, diff --git a/js/views/conversation_view.js b/js/views/conversation_view.js index b71480657..8b499fb95 100644 --- a/js/views/conversation_view.js +++ b/js/views/conversation_view.js @@ -69,16 +69,9 @@ }, template: $('#conversation').html(), render_attributes() { - let sendMessagePlaceholder = 'sendMessageFriendRequest'; - const sendDisabled = this.model.get('blockInput'); - if (sendDisabled) { - sendMessagePlaceholder = 'sendMessageDisabled'; - } else if (this.model.isFriend()) { - sendMessagePlaceholder = 'sendMessage'; - } return { - 'disable-inputs': sendDisabled, - 'send-message': i18n(sendMessagePlaceholder), + 'disable-inputs': false, + 'send-message': i18n('sendMessage'), 'android-length-warning': i18n('androidMessageLengthWarning'), }; },