assemblee-virtuelle / semapps

A toolbox to create semantic web applications
https://semapps.org
Apache License 2.0
88 stars 9 forks source link

getOrCreateWsChannel: recreate channel after it expires #1308

Open srosset81 opened 2 months ago

srosset81 commented 2 months ago

Currently, once a WebSocket channel expires, the frontend just stops listening and no message is provided to the user.

https://github.com/assemblee-virtuelle/semapps/blob/master/src/frontend/packages/semantic-data-provider/src/notificationChannels/subscribeToUpdates.ts#L135-L140

If the tab is visible (!document.hidden), or when it becomes visible again (using the visibilitychange event), we should probably recreate a WebSocket channel.