Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F33322495
D13953.1768850919.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D13953.1768850919.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 19, 7:28 PM (10 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5957854
Default Alt Text
D13953.1768850919.diff (1 KB)
Attached To
Mode
D13953: [lib] Add staff-only alert for when notifsSessionReassignmentPromise reassigns a notif session
Attached
Detach File
Event Timeline
Log In to Comment