edulution-io / edulution-ui

https://edulution.io/
2 stars 0 forks source link

Use BBB webhooks to react/notify on events #215

Open TomlDev opened 1 day ago

TomlDev commented 1 day ago

Current situation

We have the function syncConferencesWithBBB in apps/api/src/conferences/conferences.service.ts where we sync the conferences from BBB to our DB. -> Because BBB can close the conferences in the background when there is no activity.

When a user fetches his conferences we sync the conferences to check if the isRunning state from our DB is correct - and if not, update it.

Currently the sync works like this: We try to get the meeting info from BBB and if it fails (the catch block) we know the conference is not running. If it succeeds the conference is running.

The fix

There is a possibility with BBB webhooks: https://docs.bigbluebutton.org/development/webhooks/

Use our backend and relay that connects to the BBB webhook and receives the updates and notify the users with SSE.

TomlDev commented 1 day ago

Postponed because a lot of the public schools use the BBB cluster from the country which has no webhooks enabled.