element-android icon indicating copy to clipboard operation
element-android copied to clipboard

Noisy notification for every message in a room, despite default setting

Open richvdh opened this issue 2 years ago • 9 comments

Steps to reproduce

Phone is locked.

Every time a message arrives in "Backend Internal", I get a noisy notification, but that room is not set to notify me.

Outcome

What did you expect?

Pop-up, but no sound

What happened instead?

bing bing bing bing

Your phone model

Samsung Galaxy S8

Operating system version

Android 9

Application version and app store

Element 1.4.16, olm 3.2.11

Homeserver

Synapse 1.60ish

Will you send logs?

Yes

richvdh avatar May 27 '22 09:05 richvdh

Notification settings as seen on EW:

image

richvdh avatar May 27 '22 09:05 richvdh

EA seems to think it is set to "All messages":

Screenshot_20220527-101428_Element

richvdh avatar May 27 '22 09:05 richvdh

out of interest, what are your default rules set to? there was a recent change to align with iOS and web to always notify on new messages https://github.com/vector-im/element-android/issues/4632

it feels like we should respect the isNoisy push setting when deciding to alert new messages or not, at least until the notification settings options are aligned across the platforms

cc @daniellekirkwood

ouchadam avatar May 27 '22 12:05 ouchadam

Not quite sure what you mean by my default rules, but maybe this is helpful?

image

And here are my pushrules:

{
  "global": {
    "underride": [
      {
        "conditions": [],
        "actions": [
          "notify"
        ],
        "rule_id": "m.rule.member_event",
        "default": false,
        "enabled": false
      },
      {
        "conditions": [
          {
            "kind": "event_match",
            "key": "type",
            "pattern": "m.call.invite"
          }
        ],
        "actions": [
          "notify",
          {
            "set_tweak": "sound",
            "value": "ring"
          },
          {
            "set_tweak": "highlight",
            "value": false
          }
        ],
        "rule_id": ".m.rule.call",
        "default": true,
        "enabled": true
      },
      {
        "conditions": [
          {
            "kind": "room_member_count",
            "is": "2"
          },
          {
            "kind": "event_match",
            "key": "type",
            "pattern": "m.room.message"
          }
        ],
        "actions": [
          "notify",
          {
            "value": "default",
            "set_tweak": "sound"
          },
          {
            "value": false,
            "set_tweak": "highlight"
          }
        ],
        "rule_id": ".m.rule.room_one_to_one",
        "default": true,
        "enabled": true
      },
      {
        "conditions": [
          {
            "kind": "room_member_count",
            "is": "2"
          },
          {
            "kind": "event_match",
            "key": "type",
            "pattern": "m.room.encrypted"
          }
        ],
        "actions": [
          "notify",
          {
            "value": "default",
            "set_tweak": "sound"
          },
          {
            "value": false,
            "set_tweak": "highlight"
          }
        ],
        "rule_id": ".m.rule.encrypted_room_one_to_one",
        "default": true,
        "enabled": true
      },
      {
        "conditions": [
          {
            "kind": "event_match",
            "key": "type",
            "pattern": "m.room.message"
          }
        ],
        "actions": [
          "notify",
          {
            "value": false,
            "set_tweak": "highlight"
          }
        ],
        "rule_id": ".m.rule.message",
        "default": true,
        "enabled": true
      },
      {
        "conditions": [
          {
            "kind": "event_match",
            "key": "type",
            "pattern": "m.room.encrypted"
          }
        ],
        "actions": [
          "notify",
          {
            "set_tweak": "highlight",
            "value": false
          }
        ],
        "rule_id": ".m.rule.encrypted",
        "default": true,
        "enabled": true
      },
      {
        "conditions": [
          {
            "kind": "event_match",
            "key": "type",
            "pattern": "im.vector.modular.widgets"
          },
          {
            "kind": "event_match",
            "key": "content.type",
            "pattern": "jitsi"
          },
          {
            "kind": "event_match",
            "key": "state_key",
            "pattern": "*"
          }
        ],
        "actions": [
          "notify",
          {
            "set_tweak": "highlight",
            "value": false
          }
        ],
        "rule_id": ".im.vector.jitsi",
        "default": true,
        "enabled": true
      }
    ],
    "sender": [
      {
        "actions": [
          "notify",
          {
            "set_tweak": "highlight",
            "value": false
          }
        ],
        "rule_id": "@bob:matrix.org",
        "default": false,
        "enabled": true
      }
    ],
    "room": [
       // .. lots of stuff, but nothing relevant to this room
    ],
    "content": [
      {
        "actions": [
          "notify",
          {
            "value": "default",
            "set_tweak": "sound"
          },
          {
            "set_tweak": "highlight"
          }
        ],
        "pattern": "vdh",
        "rule_id": "vdh",
        "default": false,
        "enabled": true
      },
      {
        "actions": [
          "notify",
          {
            "set_tweak": "sound",
            "value": "default"
          },
          {
            "set_tweak": "highlight"
          }
        ],
        "pattern": "richvdh",
        "rule_id": ".m.rule.contains_user_name",
        "default": true,
        "enabled": true
      }
    ],
    "override": [
      {
        "conditions": [],
        "actions": [
          "dont_notify"
        ],
        "rule_id": ".m.rule.master",
        "default": true,
        "enabled": false
      },
      {
        "conditions": [
          {
            "key": "room_id",
            "kind": "event_match",
            "pattern": "!oeCrnyfPhvZiruUJLn:sw1v.org"
          }
        ],
        "actions": [
          "dont_notify"
        ],
        "rule_id": "!oeCrnyfPhvZiruUJLn:sw1v.org",
        "default": false,
        "enabled": true
      },
      {
        "conditions": [
          {
            "kind": "event_match",
            "key": "content.msgtype",
            "pattern": "m.notice"
          }
        ],
        "actions": [
          "dont_notify"
        ],
        "rule_id": ".m.rule.suppress_notices",
        "default": true,
        "enabled": true
      },
      {
        "conditions": [
          {
            "kind": "event_match",
            "key": "type",
            "pattern": "m.room.member"
          },
          {
            "kind": "event_match",
            "key": "content.membership",
            "pattern": "invite"
          },
          {
            "kind": "event_match",
            "key": "state_key",
            "pattern": "@richvdh:sw1v.org"
          }
        ],
        "actions": [
          "notify",
          {
            "value": "default",
            "set_tweak": "sound"
          },
          {
            "value": false,
            "set_tweak": "highlight"
          }
        ],
        "rule_id": ".m.rule.invite_for_me",
        "default": true,
        "enabled": true
      },
      {
        "conditions": [
          {
            "kind": "event_match",
            "key": "type",
            "pattern": "m.room.member"
          }
        ],
        "actions": [
          "dont_notify"
        ],
        "rule_id": ".m.rule.member_event",
        "default": true,
        "enabled": true
      },
      {
        "conditions": [
          {
            "kind": "contains_display_name"
          }
        ],
        "actions": [
          "notify",
          {
            "value": "default",
            "set_tweak": "sound"
          },
          {
            "set_tweak": "highlight"
          }
        ],
        "rule_id": ".m.rule.contains_display_name",
        "default": true,
        "enabled": true
      },
      {
        "conditions": [
          {
            "kind": "event_match",
            "key": "content.body",
            "pattern": "@room"
          },
          {
            "kind": "sender_notification_permission",
            "key": "room"
          }
        ],
        "actions": [
          "notify",
          {
            "set_tweak": "highlight",
            "value": true
          }
        ],
        "rule_id": ".m.rule.roomnotif",
        "default": true,
        "enabled": true
      },
      {
        "conditions": [
          {
            "kind": "event_match",
            "key": "type",
            "pattern": "m.room.tombstone"
          },
          {
            "kind": "event_match",
            "key": "state_key",
            "pattern": ""
          }
        ],
        "actions": [
          "notify",
          {
            "set_tweak": "highlight",
            "value": true
          }
        ],
        "rule_id": ".m.rule.tombstone",
        "default": true,
        "enabled": true
      },
      {
        "conditions": [
          {
            "kind": "event_match",
            "key": "type",
            "pattern": "m.reaction"
          }
        ],
        "actions": [
          "dont_notify"
        ],
        "rule_id": ".m.rule.reaction",
        "default": true,
        "enabled": true
      }
    ]
  },
  "device": {}
}

It seems to have stopped happening since I actually opened the room in EA, so it feels very much like a consistency bug.

richvdh avatar May 27 '22 12:05 richvdh

yep exactly what I meant! :100: your default rules for rooms + encrypted rooms are by default set to not make a sound

will remove the product label as the confirmation of the notifications eventually working as expected puts this firmly in defect territory

ouchadam avatar May 27 '22 12:05 ouchadam

@ouchadam It happened again this morning. Actually it seemed to be binging me for every event in every room with "default" notifications.

I think the trigger might have been that I received a message in Backend Internal that mentioned me (so caused a valid noisy notification). After that every event caused a bing until I swiped the "Backend Internal" notification to dismiss it.

richvdh avatar May 30 '22 09:05 richvdh

This is a pretty frequent occurrence. In frustration I've now set "noisy notifications" to "silent", which is a bit of a sledgehammer (though marginally less so than throwing my phone out of the window, which was my initial reaction).

Is there anything I can do to help debug?

richvdh avatar Jun 07 '22 09:06 richvdh

I think the trigger might have been that I received a message in Backend Internal that mentioned me (so caused a valid noisy notification). After that every event caused a bing until I swiped the "Backend Internal" notification to dismiss it.

I've noticed the exact same thing, same trigger. It's all fine and silent up until I receive the first mention, after which every message becomes noisy. In an active room, this gets incredibly annoying.

This does seem to be the result of a recent-ish update, within the last few months or so. Which tracks with when this bug was initially reported.

If there's any information I can provide that may be helpful, please let me know.

BobVul avatar Jul 13 '22 23:07 BobVul

Priority raised as notifications are flagged as chronic issues

ouchadam avatar Aug 08 '22 13:08 ouchadam

This is still happening. Everything is a noisy notification. It is just the most frustrating thing.

richvdh avatar Nov 21 '22 10:11 richvdh

Example push from synapse:

2022-11-21 12:18:46,743 - synapse.push.httppusher - 428 - INFO - httppush.process-403 - Sending push to https://matrix.org/_matrix/push/v1/notify: {'notification': {'event_id': '$xdSe4f6Kxn1g2oHMojmhsDHoT4_EA7v-6ss4i50GD8c', 'room_id': '!yHWhpxlXVaLcsgDUKb:matrix.org', 'counts': {'unread': 9}, 'prio': 'low', 'devices': [{'app_id': 'im.vector.app.android', 'pushkey': '<key>', 'pushkey_ts': 1668935515, 'data': {'format': 'event_id_only'}}]}}

There doesn't seem to be anything in the push that says this should be noisy. I'm pretty sure this is a client-side issue.

richvdh avatar Nov 21 '22 12:11 richvdh

While it's not the ideal solution, the desktop app has the option, 'Enable notifications for this device'.

Would be a good interim solution on mobile, to keep it quiet, while allowing the desktop to be free.

Audionut avatar May 16 '23 07:05 Audionut

@Audionut I can suppress notifications via the Android notification preferences. That doesn't help me: I want an audible notification when I get a mention or a message in a DM, but not for every message in a public room!

richvdh avatar May 16 '23 07:05 richvdh

Could someone please have a look at this issues? It's open for a year and it is really annoying and impacting battery life.

My Element constantly rings just because of a single unread message in a chat which isn't muted. Every message after that, no matter if tjis message causes a noisy notification or not, causes element to play a notification sound again. And if you are in public rooms with a lot of members, this means element will make a sound every few seconds, even thoigh those rooms are swt to have silent notifications only. That's simply unacceptable. I had to completly mute the app now, which is obviously impacting the UX as well, because I do want to get notified for some chats.

septem9er avatar Jun 27 '23 13:06 septem9er