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>(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);