Skip to content

Commit

Permalink
ensure remote notification preference is active before sending
Browse files Browse the repository at this point in the history
  • Loading branch information
n8fr8 committed Feb 28, 2019
1 parent 9571cf8 commit 292c2a1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/org/havenapp/main/service/MonitorService.java
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,8 @@ else if (mPrefs.getNotificationTimeMs() > 0 && mLastNotification != null)
alertMessage.append(getString(R.string.intrusion_detected,
eventTrigger.getStringType(new ResourceManager(this))));

if (mPrefs.getSignalUsername() != null) {
if (mPrefs.isRemoteNotificationActive() &&
mPrefs.getSignalUsername() != null) {
//since this is a secure channel, we can add the Onion address
if (mPrefs.getRemoteAccessActive() && (!TextUtils.isEmpty(mPrefs.getRemoteAccessOnion()))) {
alertMessage.append(" http://").append(mPrefs.getRemoteAccessOnion())
Expand Down

0 comments on commit 292c2a1

Please sign in to comment.