Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3512543
D13953.id.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
D13953.id.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
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)
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