Page MenuHomePhabricator

D13953.id.diff
No OneTemporary

D13953.id.diff

diff --git a/lib/keyserver-conn/keyserver-connection-handler.js b/lib/keyserver-conn/keyserver-connection-handler.js
--- a/lib/keyserver-conn/keyserver-connection-handler.js
+++ b/lib/keyserver-conn/keyserver-connection-handler.js
@@ -14,6 +14,7 @@
} from '../selectors/keyserver-selectors.js';
import { isLoggedInToKeyserver } from '../selectors/user-selectors.js';
import { useInitialNotificationsEncryptedMessage } from '../shared/crypto-utils.js';
+import { useStaffAlert } from '../shared/staff-utils.js';
import type { BaseSocketProps } from '../socket/socket.react.js';
import {
logInActionSources,
@@ -50,6 +51,8 @@
const prevCookieRef = React.useRef(cookie);
const notifsSessionReassignmentPromise = React.useRef<?Promise<mixed>>(null);
+ const { showAlertToStaff } = useStaffAlert();
+
React.useEffect(() => {
const prevCookie = prevCookieRef.current;
prevCookieRef.current = cookie;
@@ -58,6 +61,13 @@
return;
}
+ if (prevCookie) {
+ showAlertToStaff(
+ 'Reassigning a notif session',
+ `prevCookie=${prevCookie} cookie=${cookie}`,
+ );
+ }
+
notifsSessionReassignmentPromise.current = (async () => {
await notifsSessionReassignmentPromise.current;
await olmAPI.reassignNotificationsSession?.(
@@ -66,7 +76,7 @@
keyserverID,
);
})();
- }, [cookie, keyserverID, olmAPI]);
+ }, [cookie, keyserverID, olmAPI, showAlertToStaff]);
const dataLoaded = useSelector(state => state.dataLoaded);

File Metadata

Mime Type
text/plain
Expires
Sun, Dec 22, 8:27 PM (55 m, 57 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2688665
Default Alt Text
D13953.id.diff (1 KB)

Event Timeline