diff --git a/lib/shared/dm-ops/dm-op-spec.js b/lib/shared/dm-ops/dm-op-spec.js --- a/lib/shared/dm-ops/dm-op-spec.js +++ b/lib/shared/dm-ops/dm-op-spec.js @@ -1,6 +1,7 @@ // @flow import type { DMOperation, DMOperationResult } from '../../types/dm-ops.js'; +import type { RawEntryInfos } from '../../types/entry-types.js'; import type { RawMessageInfo } from '../../types/message-types.js'; import type { NotificationsCreationData } from '../../types/notif-types.js'; import type { RawThreadInfos } from '../../types/thread-types.js'; @@ -9,6 +10,7 @@ // Needed to fetch sidebar source messages +fetchMessage: (messageID: string) => Promise, +threadInfos: RawThreadInfos, + +entryInfos: RawEntryInfos, }; export type DMOperationSpec = { diff --git a/lib/shared/dm-ops/process-dm-ops.js b/lib/shared/dm-ops/process-dm-ops.js --- a/lib/shared/dm-ops/process-dm-ops.js +++ b/lib/shared/dm-ops/process-dm-ops.js @@ -41,13 +41,15 @@ ) => Promise { const fetchMessage = useGetLatestMessageEdit(); const threadInfos = useSelector(state => state.threadStore.threadInfos); + const entryInfos = useSelector(state => state.entryStore.entryInfos); const utilities = React.useMemo( () => ({ fetchMessage, threadInfos, + entryInfos, }), - [fetchMessage, threadInfos], + [fetchMessage, threadInfos, entryInfos], ); const dispatchWithMetadata = useDispatchWithMetadata(); @@ -321,6 +323,7 @@ ) => Promise<$ReadOnlyArray> { const fetchMessage = useGetLatestMessageEdit(); const threadInfos = useSelector(state => state.threadStore.threadInfos); + const entryInfos = useSelector(state => state.entryStore.entryInfos); const { getDMOpsSendingPromise } = usePeerToPeerCommunication(); const dispatchWithMetadata = useDispatchWithMetadata(); const allPeerUserIDAndDeviceIDs = useSelector(getAllPeerUserIDAndDeviceIDs); @@ -330,8 +333,9 @@ () => ({ fetchMessage, threadInfos, + entryInfos, }), - [fetchMessage, threadInfos], + [fetchMessage, threadInfos, entryInfos], ); return React.useCallback(