diff --git a/js/modules/types/contact.js b/js/modules/types/contact.js index 1becc80aa..b2e5c0df4 100644 --- a/js/modules/types/contact.js +++ b/js/modules/types/contact.js @@ -2,7 +2,6 @@ const { omit, compact, map } = require('lodash'); const { toLogFormat } = require('./errors'); const { SignalService } = require('../../../ts/protobuf'); -const { parse: parsePhoneNumber } = require('../../../ts/types/PhoneNumber'); const DEFAULT_PHONE_TYPE = SignalService.DataMessage.Contact.Phone.Type.HOME; @@ -80,7 +79,7 @@ function parsePhoneItem(item) { return Object.assign({}, item, { type: item.type || DEFAULT_PHONE_TYPE, - value: parsePhoneNumber(item.value), + value: item.value, }); } diff --git a/ts/receiver/queuedJob.ts b/ts/receiver/queuedJob.ts index 1a95dbd5f..b0cdf5968 100644 --- a/ts/receiver/queuedJob.ts +++ b/ts/receiver/queuedJob.ts @@ -530,6 +530,10 @@ export async function handleMessageJob( const { Whisper, getMessageController } = window; const id = await message.commit(); message.set({ id }); + window.Whisper.events.trigger('messageAdded', { + conversationKey: conversation.id, + messageModel: message, + }); getMessageController().register(message.id, message); // Note that this can save the message again, if jobs were queued. We need to