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 @@ -1166,16 +1166,26 @@ action.type === sendTextMessageActionTypes.failed || action.type === sendMultimediaMessageActionTypes.failed ) { - const { localID } = action.payload; + const { localID, failedOutboundP2PMessageIDs } = action.payload; + + let newLocalMessageInfo = { + sendFailed: true, + }; + + // For thick threads, we need to keep track of all not sent P2P messages + if (failedOutboundP2PMessageIDs && failedOutboundP2PMessageIDs.length > 0) { + newLocalMessageInfo = { + ...newLocalMessageInfo, + outboundP2PMessageIDs: failedOutboundP2PMessageIDs, + }; + } const messageStoreOperations = [ { type: 'replace_local_message_info', payload: { id: localID, - localMessageInfo: { - sendFailed: true, - }, + localMessageInfo: newLocalMessageInfo, }, }, ]; diff --git a/lib/types/redux-types.js b/lib/types/redux-types.js --- a/lib/types/redux-types.js +++ b/lib/types/redux-types.js @@ -724,6 +724,7 @@ +payload: Error & { +localID: string, +threadID: string, + +failedOutboundP2PMessageIDs?: $ReadOnlyArray, }, +loadingInfo?: LoadingInfo, } @@ -743,6 +744,7 @@ +payload: Error & { +localID: string, +threadID: string, + +failedOutboundP2PMessageIDs?: $ReadOnlyArray, }, +loadingInfo?: LoadingInfo, }