Browse Source

ensure remote notification preference is active before sending

n8fr8 7 months ago
parent
commit
292c2a1535
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/main/java/org/havenapp/main/service/MonitorService.java

+ 2 - 1
src/main/java/org/havenapp/main/service/MonitorService.java

@@ -368,7 +368,8 @@ public class MonitorService extends Service {
368 368
             alertMessage.append(getString(R.string.intrusion_detected,
369 369
                     eventTrigger.getStringType(new ResourceManager(this))));
370 370
 
371
-            if (mPrefs.getSignalUsername() != null) {
371
+            if (mPrefs.isRemoteNotificationActive() &&
372
+                    mPrefs.getSignalUsername() != null) {
372 373
                 //since this is a secure channel, we can add the Onion address
373 374
                 if (mPrefs.getRemoteAccessActive() && (!TextUtils.isEmpty(mPrefs.getRemoteAccessOnion()))) {
374 375
                     alertMessage.append(" http://").append(mPrefs.getRemoteAccessOnion())