mirror of
https://github.com/discourse/discourse.git
synced 2025-02-21 05:52:38 +08:00

We consider that you should always receive a notification sound when someone speaks directly with you in chat. This commit also refactors the way we play audio in chat to make it simpler and throttle it to 3 seconds. We also added a safeguard to ensure we won't play sounds for old messages, this case can happen when message bus is catching up the backlog (eg: in an inactive tab for example).