dendrite icon indicating copy to clipboard operation
dendrite copied to clipboard

Read receipt in DM triggers notification sound on Element Desktop

Open 0x1a8510f2 opened this issue 2 years ago • 2 comments

Background information

  • Dendrite version or git SHA: 0.8.1
  • Monolith or Polylith?: Mono
  • SQLite3 or Postgres?: Postgres
  • Running in Docker?: Yes
  • go version: n/a
  • Client used (if applicable): Element Desktop

Description

  • What is the problem: Receiving a read receipt triggers a notification sound; this is not the case with Synapse
  • Who is affected: Element Desktop/Dendrite users
  • How is this bug manifesting: Sound plays when read receipt is received
  • When did this first appear: IIRC after the notifications support merge

Steps to reproduce

  • Start Element Desktop
  • Send a message to another user
  • Wait for user to open message
  • Notice sound when read receipt goes through

0x1a8510f2 avatar Apr 14 '22 13:04 0x1a8510f2

Probably a problem with the push rules. Maybe this:

      "room": [
        {
          "actions": [
            "notify",
            {
              "set_tweak": "sound",
              "value": "default"
            }
          ],
          "default": false,
          "enabled": true
        }
      ],

neilalexander avatar Apr 15 '22 10:04 neilalexander

@neilalexander this seems to be the default configuration for all rooms, with which the problem still happens. If I create the following pushrule manually, the problem goes away:

	"rule_id": "nonotificationonread",
	"enabled": true,
	"actions": [
		"dont_notify"
	],
	"conditions": [
		{
			"kind": "event_match",
			"key": "type",
			"pattern": "m.receipt"
		}
	]
}

nadanke avatar Jul 25 '22 14:07 nadanke

Hi, I have the same problem, but I am clueless on how to update the push rules, can you help me with it?

baalajimaestro avatar Oct 04 '22 08:10 baalajimaestro

I also have this problem. It's very annoying to hear the notification sound only to find there's nothing there. How do you modify push rules?

Charadon avatar Oct 13 '22 21:10 Charadon

This is really strange and I cannot reproduce it. Dendrite doesn't handle EDUs in the notification code at all, so all I can assume is that there's something odd in the push rules and/or Element Web.

You can try nuking the push rules for your account and letting Dendrite regenerate them, i.e. something like this on the user API database, to see if that helps:

DELETE FROM account_data WHERE localpart = 'neilalexander' AND type = 'm.push_rules';

neilalexander avatar Oct 14 '22 08:10 neilalexander

This is really strange and I cannot reproduce it. Dendrite doesn't handle EDUs in the notification code at all, so all I can assume is that there's something odd in the push rules and/or Element Web.

You can try nuking the push rules for your account and letting Dendrite regenerate them, i.e. something like this on the user API database, to see if that helps:

DELETE FROM account_data WHERE localpart = 'neilalexander' AND type = 'm.push_rules';

Unfortunately, that did not fix it. I should also mention that this is a fresh dendrite install

Charadon avatar Oct 14 '22 13:10 Charadon

This is really strange and I cannot reproduce it. Dendrite doesn't handle EDUs in the notification code at all, so all I can assume is that there's something odd in the push rules and/or Element Web.

You can try nuking the push rules for your account and letting Dendrite regenerate them, i.e. something like this on the user API database, to see if that helps:

DELETE FROM account_data WHERE localpart = 'neilalexander' AND type = 'm.push_rules';

This did fix it mostly. but there are some notifications from groups, where normal text, without a mention, or a keyword, gets triggered as message type notice, and triggers a notification on element/fluffychat. I have tried to debug this, but to not much avail. The message that becomes a notice, is seemingly very random.

baalajimaestro avatar Oct 16 '22 11:10 baalajimaestro

This did fix it mostly. but there are some notifications from groups, where normal text, without a mention, or a keyword, gets triggered as message type notice, and triggers a notification on element/fluffychat. I have tried to debug this, but to not much avail. The message that becomes a notice, is seemingly very random.

Which database did you run that command on? Because for me, it didn't do anything.

Charadon avatar Oct 18 '22 14:10 Charadon