If the back is getting an error (because the user has no right to set a variable),
instead of failing directly, let's try to reload the map (maybe we have cached a wrong version of the map).
This commit increases idle timeout for websocket connection
Issue: after 5 minutes of inactive tab (hidden tab) in Chrome, WorkAdventure was disconnected.
I believe Google was going in "intensive throttling" mode (see https://developer.chrome.com/blog/timer-throttling-in-chrome-88/#intensive-throttling)
This means setTimeouts are run only once per minute.
And I believe the "keep alive" must be implemented with a "setTimeout" (one way or another even if I can't find a trace of this in the code). This would mean that the browser would send keep alive requests only once per minute.
But the pusher is configured to shut the connection after 30 seconds of idle activity.
Therefore, the pusher disconnects inactive Chrome tabs. By raising the Pusher idle timer to 2 minutes, we give a chance to Chrome to send a ping to the server in time (since Chrome won't send more than 1 ping per minute).
Up until this commit, variables nested in object layers inside group layers where not found by the front nor the back.
This PR changes analysis so that variables can be detected.
* HotFix ban user
- Fix to permit to ban user with more sub tab openned
- Fix to permit to send message ban to the user with more sub tab oppened
* Fix CI
* Run pretty
The "persist" property was not taken into account and all variables were stored in DB. This change makes sure only variables tagged with "persist" are actually persisted.
Setting a variable would makes the application enter in an infinite loop of events (between all the scripts and the back)
This fix makes sure a variable does not emit any event if it is changed to a value it already has.
The notion of public/private repositories (with /_/ and /@/ URLs) is specific to the SAAS version of WorkAdventure.
It would be better to avoid leaking the organization/world/room structure of the private SAAS URLs inside the WorkAdventure Github project.
Rather than sending http://admin_host/api/map?organizationSlug=...&worldSlug=...&roomSlug=...., we are now sending /api/map&playUri=...
where playUri is the full URL of the current game.
This allows the backend to act as a complete router.
The front (and the pusher) will be able to completely ignore the specifics of URL building (with /@/ and /_/ URLs, etc...)
Those details will live only in the admin server, which is way cleaner (and way more powerful).
This way, if a user A blocks another user B, if user B refreshes the browser or leaves and re-enters the room, user B will still be blocked.
As a side effect, this allows us to completely remove the "sockets" property in the SocketManager on the Pusher.