Page MenuHomePhabricator

D13445.id44479.diff
No OneTemporary

D13445.id44479.diff

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

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)

Event Timeline