Page MenuHomePhorge

D15196.1765072981.diff
No OneTemporary

Size
3 KB
Referenced Files
None
Subscribers
None

D15196.1765072981.diff

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
@@ -1874,7 +1874,8 @@
const sendingComposableDMMessageToPeers =
composableMessageID &&
outboundP2PMessages &&
- outboundP2PMessages.length > 0;
+ outboundP2PMessages.length > 0 &&
+ action.dispatchSource !== 'tab-sync';
// For composable DM messages, we rely on dedicated actions
// (`sendTextMessageActionTypes` or `sendMultimediaMessageActionTypes`)
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
@@ -154,7 +154,11 @@
messagesNotifyTypes: {},
};
dispatchWithMetadata(
- { type: processDMOpsActionType, payload },
+ {
+ type: processDMOpsActionType,
+ payload,
+ dispatchSource: 'tunnelbroker',
+ },
dispatchMetadata,
);
@@ -289,7 +293,11 @@
messagesNotifyTypes,
};
dispatchWithMetadata(
- { type: processDMOpsActionType, payload },
+ {
+ type: processDMOpsActionType,
+ payload,
+ dispatchSource: 'tunnelbroker',
+ },
dispatchMetadata,
);
},
@@ -404,7 +412,11 @@
messagesNotifyTypes,
};
dispatchWithMetadata(
- { type: processDMOpsActionType, payload },
+ {
+ type: processDMOpsActionType,
+ payload,
+ dispatchSource: 'tunnelbroker',
+ },
{ dmOpID },
);
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
@@ -1563,6 +1563,7 @@
| {
+type: 'PROCESS_DM_OPS',
+payload: ProcessDMOpsPayload,
+ +dispatchSource?: DispatchSource,
}
| {
+type: 'INVALIDATE_TUNNELBROKER_DEVICE_TOKEN',
diff --git a/web/redux/redux-setup.js b/web/redux/redux-setup.js
--- a/web/redux/redux-setup.js
+++ b/web/redux/redux-setup.js
@@ -547,12 +547,6 @@
}
// The operations were already dispatched from the main tab
-
- // For now the `dispatchSource` field is not included in any of the
- // redux actions and this causes flow to throw an error.
- // As soon as one of the actions is updated, this fix (and the corresponding
- // one in tab-synchronization.js) can be removed.
- // $FlowFixMe
if (action.dispatchSource === 'tab-sync') {
return state;
}
diff --git a/web/redux/tab-synchronization.js b/web/redux/tab-synchronization.js
--- a/web/redux/tab-synchronization.js
+++ b/web/redux/tab-synchronization.js
@@ -9,11 +9,6 @@
const tabSynchronizationMiddleware: Middleware<AppState, Action> =
() => next => action => {
const result = next(action);
- // For now the `dispatchSource` field is not included in any of the
- // redux actions and this causes flow to throw an error.
- // As soon as one of the actions is updated, this fix (and the corresponding
- // one in redux-setup.js) can be removed.
- // $FlowFixMe
if (action.dispatchSource === 'tunnelbroker') {
WEB_REDUX_CHANNEL.postMessage(action);
}

File Metadata

Mime Type
text/plain
Expires
Sun, Dec 7, 2:03 AM (12 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5841434
Default Alt Text
D15196.1765072981.diff (3 KB)

Event Timeline