exoplatform / chat-application

Chat application
GNU Affero General Public License v3.0
38 stars 57 forks source link

fix: enhance infinite loading of chat when logged out - EXO-67681 (#678) #686

Closed ahamdi closed 7 months ago

ahamdi commented 7 months ago

When a user is logged out , the popup to force him reconnect does not show up and we have an infinite calls to the server to retrieve user status and his rooms. This commit fixes the check of the user disconnection that was checking cometd status which is wrong as the logout event is already using the cometd channel to dispatch the event to all pages. Besides, when the eXo platform server returns a 403 error for Rest calls, it is sure that the user is logged out, then we send an event to all components of the Chat app to notify and display the login popup.

sonarcloud[bot] commented 7 months ago

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint