diff --git a/js/background.js b/js/background.js index f16ab1c8e5..283365e64d 100644 --- a/js/background.js +++ b/js/background.js @@ -1071,25 +1071,10 @@ } function onConfiguration(ev) { const { configuration } = ev; - const { - readReceipts, - typingIndicators, - unidentifiedDeliveryIndicators, - linkPreviews, - } = configuration; + const { readReceipts, typingIndicators, linkPreviews } = configuration; storage.put('read-receipt-setting', readReceipts); - if ( - unidentifiedDeliveryIndicators === true || - unidentifiedDeliveryIndicators === false - ) { - storage.put( - 'unidentifiedDeliveryIndicators', - unidentifiedDeliveryIndicators - ); - } - if (typingIndicators === true || typingIndicators === false) { storage.put('typing-indicators-setting', typingIndicators); } diff --git a/js/models/conversations.js b/js/models/conversations.js index 88011f182c..833e668652 100644 --- a/js/models/conversations.js +++ b/js/models/conversations.js @@ -86,9 +86,6 @@ if (this.isPublic) { this.set('profileSharing', true); } - - this.unset('unidentifiedDelivery'); - this.unset('unidentifiedDeliveryUnrestricted'); this.unset('hasFetchedProfile'); this.unset('tokens'); diff --git a/js/models/messages.js b/js/models/messages.js index 5682dad686..6cfe53a3c4 100644 --- a/js/models/messages.js +++ b/js/models/messages.js @@ -677,25 +677,10 @@ : null, }; }, - isUnidentifiedDelivery(contactId, lookup) { - if (this.isIncoming()) { - return this.get('unidentifiedDeliveryReceived'); - } - - return Boolean(lookup[contactId]); - }, async getPropsForMessageDetail() { const newIdentity = i18n('newIdentity'); const OUTGOING_KEY_ERROR = 'OutgoingIdentityKeyError'; - const unidentifiedLookup = ( - this.get('unidentifiedDeliveries') || [] - ).reduce((accumulator, item) => { - // eslint-disable-next-line no-param-reassign - accumulator[item] = true; - return accumulator; - }, Object.create(null)); - // We include numbers we didn't successfully send to so we can display errors. // Older messages don't have the recipients included on the message, so we fall // back to the conversation's current recipients @@ -726,9 +711,6 @@ const isOutgoingKeyError = Boolean( _.find(errorsForContact, error => error.name === OUTGOING_KEY_ERROR) ); - const isUnidentifiedDelivery = - storage.get('unidentifiedDeliveryIndicators') && - this.isUnidentifiedDelivery(id, unidentifiedLookup); const contact = this.findAndFormatContact(id); return { @@ -738,7 +720,6 @@ status: this.getStatus(id) || this.getMessagePropStatus(), errors: errorsForContact, isOutgoingKeyError, - isUnidentifiedDelivery, isPrimaryDevice: true, profileName: contact.profileName, }; diff --git a/ts/components/conversation/MessageDetail.tsx b/ts/components/conversation/MessageDetail.tsx index 98e9e7fb3d..cced52ede0 100644 --- a/ts/components/conversation/MessageDetail.tsx +++ b/ts/components/conversation/MessageDetail.tsx @@ -15,7 +15,6 @@ interface Contact { avatarPath?: string; color: string; isOutgoingKeyError: boolean; - isUnidentifiedDelivery: boolean; errors?: Array; @@ -89,9 +88,6 @@ export class MessageDetail extends React.Component { )} /> ) : null; - const unidentifiedDeliveryComponent = contact.isUnidentifiedDelivery ? ( -
- ) : null; return (
@@ -113,7 +109,6 @@ export class MessageDetail extends React.Component { ))}
{errorComponent} - {unidentifiedDeliveryComponent} {statusComponent}
); diff --git a/ts/receiver/dataMessage.ts b/ts/receiver/dataMessage.ts index 9d757818e9..d0dac17b5b 100644 --- a/ts/receiver/dataMessage.ts +++ b/ts/receiver/dataMessage.ts @@ -311,7 +311,6 @@ export async function handleDataMessage( sourceDevice: 1, timestamp: _.toNumber(envelope.timestamp), receivedAt: envelope.receivedAt, - unidentifiedDeliveryReceived: envelope.unidentifiedDeliveryReceived, message, }; @@ -414,7 +413,6 @@ interface MessageCreationData { isPublic: boolean; receivedAt: number; sourceDevice: number; // always 1 isn't it? - unidentifiedDeliveryReceived: any; // ??? source: boolean; serverId: string; message: any; @@ -432,7 +430,6 @@ export function initIncomingMessage(data: MessageCreationData): MessageModel { isPublic, receivedAt, sourceDevice, - unidentifiedDeliveryReceived, source, serverId, message, @@ -456,7 +453,6 @@ export function initIncomingMessage(data: MessageCreationData): MessageModel { serverTimestamp, received_at: receivedAt || Date.now(), conversationId: groupId ?? source, - unidentifiedDeliveryReceived, // + type, direction: 'incoming', // + unread: 1, // + @@ -588,11 +584,7 @@ export async function handleMessageEvent(event: MessageEvent): Promise { const isOurDevice = await UserUtils.isUs(source); - const shouldSendReceipt = - isIncoming && - data.unidentifiedDeliveryReceived && - !isGroupMessage && - !isOurDevice; + const shouldSendReceipt = isIncoming && !isGroupMessage && !isOurDevice; if (shouldSendReceipt) { sendDeliveryReceipt(source, data.timestamp); diff --git a/ts/receiver/types.ts b/ts/receiver/types.ts index 3adaa3e50b..431cbb5ffe 100644 --- a/ts/receiver/types.ts +++ b/ts/receiver/types.ts @@ -11,6 +11,5 @@ export interface Quote { export interface EnvelopePlus extends SignalService.Envelope { senderIdentity: string; // Sender's pubkey after it's been decrypted (for medium groups) receivedAt: number; // We only seem to set this for public messages? - unidentifiedDeliveryReceived: boolean; id: string; } diff --git a/ts/state/ducks/conversations.ts b/ts/state/ducks/conversations.ts index f2173b2af9..cfc98b3dab 100644 --- a/ts/state/ducks/conversations.ts +++ b/ts/state/ducks/conversations.ts @@ -416,7 +416,6 @@ const toPickFromMessageModel = [ 'isIncoming', 'findAndFormatContact', 'findContact', - 'isUnidentifiedDelivery', 'getStatus', 'getMessagePropStatus', 'hasErrors',