diff --git a/lib/reducers/message-reducer.js b/lib/reducers/message-reducer.js --- a/lib/reducers/message-reducer.js +++ b/lib/reducers/message-reducer.js @@ -96,6 +96,7 @@ messageTruncationStatus, defaultNumberPerThread, type ThreadMessageInfo, + type MessageStoreLocalMessageInfos, } from '../types/message-types.js'; import type { RawImagesMessageInfo } from '../types/messages/images.js'; import type { RawMediaMessageInfo } from '../types/messages/media.js'; @@ -1736,7 +1737,7 @@ action.payload.messageStoreThreads ?? [], ); - const actionPayloadMessageStoreLocalMessageInfos = + const actionPayloadMessageStoreLocalMessageInfos: MessageStoreLocalMessageInfos = action.payload.messageStoreLocalMessageInfos ?? {}; const messageStoreOperations: Array = []; @@ -1744,9 +1745,9 @@ for (const localMessageID in actionPayloadMessageStoreLocalMessageInfos) { if ( actionPayloadMessageStoreLocalMessageInfos[localMessageID] - .outboundP2PMessages && + .outboundP2PMessageIDs && actionPayloadMessageStoreLocalMessageInfos[localMessageID] - .outboundP2PMessages.length > 0 + .outboundP2PMessageIDs.length > 0 ) { // If there are `outboundP2PMessages` it means the message failed, // but setting `sendFailed` could not be done, e.g. when the app was