Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F33149745
D13010.1768510953.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D13010.1768510953.diff
View Options
diff --git a/lib/reducers/db-ops-reducer.js b/lib/reducers/db-ops-reducer.js
--- a/lib/reducers/db-ops-reducer.js
+++ b/lib/reducers/db-ops-reducer.js
@@ -26,8 +26,10 @@
ops: {
outboundP2PMessages: action.payload.messages,
},
+ notificationsCreationData: action.payload.notificationsCreationData,
dmOpID: action.payload.dmOpID,
};
+
return {
...store,
queuedOps: [...store.queuedOps, newEntry],
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
@@ -2,6 +2,7 @@
import type { DMOperation, DMOperationResult } from '../../types/dm-ops.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';
export type ProcessDMOperationUtilities = {
@@ -26,4 +27,5 @@
+isProcessingPossible: false,
+reason: { +type: 'missing_thread', +threadID: string },
},
+ +notificationsCreationData?: (dmOp: DMOp) => NotificationsCreationData,
};
diff --git a/lib/tunnelbroker/peer-to-peer-context.js b/lib/tunnelbroker/peer-to-peer-context.js
--- a/lib/tunnelbroker/peer-to-peer-context.js
+++ b/lib/tunnelbroker/peer-to-peer-context.js
@@ -9,6 +9,7 @@
useTunnelbroker,
} from './tunnelbroker-context.js';
import { usePeerOlmSessionsCreatorContext } from '../components/peer-olm-session-creator-provider.react.js';
+import { dmOpSpecs } from '../shared/dm-ops/dm-op-specs.js';
import {
createMessagesToPeersFromDMOp,
type DMOperationSpecification,
@@ -184,11 +185,20 @@
auxUserStore,
currentUserInfo,
);
+
+ const {
+ op: { type },
+ } = op;
+ const notificationsCreationData = dmOpSpecs[
+ type
+ ].notificationsCreationData?.(op.op);
+
dispatch({
type: scheduleP2PMessagesActionType,
payload: {
dmOpID,
messages,
+ notificationsCreationData,
},
});
diff --git a/lib/types/dm-ops.js b/lib/types/dm-ops.js
--- a/lib/types/dm-ops.js
+++ b/lib/types/dm-ops.js
@@ -4,6 +4,7 @@
import { clientAvatarValidator, type ClientAvatar } from './avatar-types.js';
import type { RawMessageInfo } from './message-types.js';
+import type { NotificationsCreationData } from './notif-types.js';
import type { OutboundP2PMessage } from './sqlite-types.js';
import {
type NonSidebarThickThreadType,
@@ -323,6 +324,7 @@
export type ScheduleP2PMessagesPayload = {
+dmOpID: string,
+messages: $ReadOnlyArray<OutboundP2PMessage>,
+ +notificationsCreationData?: NotificationsCreationData,
};
export const clearQueuedThreadDMOpsActionType = 'CLEAR_QUEUED_THREAD_DM_OPS';
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jan 15, 9:02 PM (4 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5940022
Default Alt Text
D13010.1768510953.diff (2 KB)
Attached To
Mode
D13010: Update db ops reducer to process notiications creation data
Attached
Detach File
Event Timeline
Log In to Comment