Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3299764
D13445.id44479.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D13445.id44479.diff
View Options
diff --git a/lib/tunnelbroker/peer-to-peer-message-handler.js b/lib/tunnelbroker/peer-to-peer-message-handler.js
--- a/lib/tunnelbroker/peer-to-peer-message-handler.js
+++ b/lib/tunnelbroker/peer-to-peer-message-handler.js
@@ -7,6 +7,7 @@
useHandleOlmMessageToDevice,
usePeerToPeerMessageHandler,
} from './use-peer-to-peer-message-handler.js';
+import { useLoggedInUserInfo } from '../hooks/account-hooks.js';
import type { InboundP2PMessage } from '../types/sqlite-types.js';
import type { MessageReceiveConfirmation } from '../types/tunnelbroker/message-receive-confirmation-types.js';
import {
@@ -164,8 +165,10 @@
socketSend,
]);
+ const loggedInUserInfo = useLoggedInUserInfo();
+ const viewerID = loggedInUserInfo?.id;
React.useEffect(() => {
- if (isProcessing) {
+ if (isProcessing || !viewerID) {
return;
}
if (!processedInboundMessages) {
@@ -179,6 +182,7 @@
processMessage,
processedInboundMessages,
processPersistedInboundMessages,
+ viewerID,
]);
React.useEffect(() => {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 18, 3:26 PM (21 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2534964
Default Alt Text
D13445.id44479.diff (1 KB)
Attached To
Mode
D13445: [lib] don't process persisted inbound messages without `viewerID`
Attached
Detach File
Event Timeline
Log In to Comment