Nowadays most people have multiple messengers open at the same time. They are from different vendors and each one manages its own user availability state.
So if a user starts a call on one messenger, the availability status changes to ‘occupied’ on that messenger but not on the other ones.
It would be great if there was a JS API (and eventually also an OS API) that would manage a set of availability states for the current user and broadcasted an event to the OS whenever the state changed.
That way, when a user manually changed the status on one messenger (or in the OS), it would trigger a cascade and change the status on all open messengers.
Since most messengers are implemented with Web technologies, a JS API would make sense. Mac OS already has a ‘Do not disturb’ functionality. From what I can tell it is not a public API though.