[web] Extract a function that determines where to store notifs session
Summary:
This function will be also used in a function that reassigns the session.
https://linear.app/comm/issue/ENG-7688/introduce-a-function-that-moves-a-notifs-session
Test Plan: Tested in combination with the next diffs: open the web app, login, send a message from another client - a notif should be displayed (without this stack we can only see a notif with a warning message). Also, verify that the reassignment actually occurs by adding some console logs.
Reviewers: kamil, varun, marcin
Reviewed By: marcin
Subscribers: ashoat
Differential Revision: https://phab.comm.dev/D11647