From c9bdb98e415fcdb2ba7ef600d087b72b30c09734 Mon Sep 17 00:00:00 2001 From: pierre-lehnen-rc <55164754+pierre-lehnen-rc@users.noreply.github.com> Date: Fri, 18 Sep 2020 15:39:08 -0300 Subject: [PATCH] [FIX] Stop adding push messages to queue if push is disabled (#18830) --- app/lib/server/functions/notifications/mobile.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/lib/server/functions/notifications/mobile.js b/app/lib/server/functions/notifications/mobile.js index 4d1b7482b12..9dce401393c 100644 --- a/app/lib/server/functions/notifications/mobile.js +++ b/app/lib/server/functions/notifications/mobile.js @@ -81,6 +81,10 @@ export function shouldNotifyMobile({ roomType, isThread, }) { + if (settings.get('Push_enable') !== true) { + return false; + } + if (disableAllMessageNotifications && mobilePushNotifications == null && !isHighlighted && !hasMentionToUser && !hasReplyToThread) { return false; }