diff --git a/web/shared-worker/worker/shared-worker.js b/web/shared-worker/worker/shared-worker.js --- a/web/shared-worker/worker/shared-worker.js +++ b/web/shared-worker/worker/shared-worker.js @@ -291,6 +291,15 @@ type: workerResponseMessageTypes.GET_MESSAGES, messages: webMessageEntities.map(webMessageToClientDBMessageInfo), }; + } else if ( + message.type === workerRequestMessageTypes.GET_INBOUND_P2P_MESSAGES_BY_ID + ) { + return { + type: workerResponseMessageTypes.GET_INBOUND_P2P_MESSAGES, + inboundP2PMessages: sqliteQueryExecutor.getInboundP2PMessagesByID( + message.messageIDs, + ), + }; } // write operations diff --git a/web/types/worker-types.js b/web/types/worker-types.js --- a/web/types/worker-types.js +++ b/web/types/worker-types.js @@ -49,6 +49,7 @@ SEARCH_MESSAGES: 23, RESET_OUTBOUND_P2P_MESSAGES: 24, FETCH_MESSAGES: 25, + GET_INBOUND_P2P_MESSAGES_BY_ID: 26, }); export const workerWriteRequests: $ReadOnlyArray = [ @@ -225,6 +226,11 @@ +offset: number, }; +export type GetInboundP2PMessagesByIDRequestMessage = { + +type: 26, + +messageIDs: $ReadOnlyArray, +}; + export type WorkerRequestMessage = | PingWorkerRequestMessage | InitWorkerRequestMessage @@ -251,7 +257,8 @@ | GetOutboundP2PMessagesByIDRequestMessage | SearchMessagesRequestMessage | ResetOutboundP2PMessagesRequestMessage - | FetchMessagesRequestMessage; + | FetchMessagesRequestMessage + | GetInboundP2PMessagesByIDRequestMessage; export type WorkerRequestProxyMessage = { +id: number,