FIX: prevents playing chat sound when in DnD (#19575)

I couldn't figure a sane way to test this, I'm open to suggestions.
This commit is contained in:
Joffrey JAFFEUX 2022-12-22 11:19:54 +01:00 committed by GitHub
parent c0b21bf9cf
commit d54f347883
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -19,6 +19,10 @@ export default {
withPluginApi("0.12.1", (api) => {
api.registerDesktopNotificationHandler((data, siteSettings, user) => {
if (user.isInDoNotDisturb()) {
return;
}
if (!user.chat_sound) {
return;
}