Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F2761270
D13346.id44200.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D13346.id44200.diff
View Options
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<?RawMessageInfo>,
+threadInfos: RawThreadInfos,
+ +entryInfos: RawEntryInfos,
};
export type DMOperationSpec<DMOp: DMOperation> = {
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<void> {
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<string>> {
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(
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Sep 20, 7:58 AM (17 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2146753
Default Alt Text
D13346.id44200.diff (2 KB)
Attached To
Mode
D13346: [lib] extend ProcessDMOperationUtilities to include entryInfos
Attached
Detach File
Event Timeline
Log In to Comment