Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Defaults for 1:1 chat notifications are not obeyed for Android push notifications #2537

Open
matrixbot opened this issue Nov 1, 2024 · 6 comments
Labels
C-User-API F-Push T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.

Comments

@matrixbot
Copy link
Collaborator

This issue was originally created by @PaulosV at matrix-org/dendrite#2537.

Background information

  • Dendrite version or git SHA: 0.8.8
  • Monolith or Polylith?: Monolith
  • SQLite3 or Postgres?: Postgres
  • Running in Docker?: Yes
  • Client used (if applicable): Element (Android) 1.4.16 [40104162] (G-b8288) ; SchildiChat 1.4.20.sc55 [40100880] (G-776afd86)

Description

  • What is the problem: No push notifications are sent for one-to-one chats with room notification settings set to "Default". Defaults for one-to-one chat notifications in Element client are set to "Noisy".
  • Who is affected: Me.
  • How is this bug manifesting: On Android, I get no notification for 1:1 chats when the Android app is in the background. I get the notifications when I manually set the chat notifications to "All messages", OR if I set the group messages defaults to "On / Noisy".
  • When did this first appear: Don't know. Noticed it on 2022-06-19.

Steps to reproduce

  • Login to your Dendrite homeserver on your Android phone.
  • In your client, set these defaults in settings - 1:1 chat notifications to On / Noisy, and Group chat notifications to Off.
  • Create a 1:1 chat with someone.
  • Set room notification settings to Default.
  • Ensure that your desktop client is not running / is not in focus.
  • Ask the other user to send you a message.

The Android client in the background gets no notification. It should have gotten something. It receives all the notifications when it goes back in the foreground.

@matrixbot matrixbot added C-User-API F-Push T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. labels Nov 1, 2024
@matrixbot
Copy link
Collaborator Author

This comment was originally posted by @jittygitty at matrix-org/dendrite#2537 (comment).

@PaulosV Try a trigger to populate the notifications rules, such as for element android see: element-hq/element-android#6115 (comment)
and matrix-org/dendrite#2484

@matrixbot
Copy link
Collaborator Author

This comment was originally posted by @S7evinK at matrix-org/dendrite#2537 (comment).

Possibly related to Dendrite not sending the notification count to the push gateway - should be fixed by matrix-org/dendrite#2683.
Does this still happen? If so, it may also be related to the push gateway (default matrix.org) being overloaded and takes some time to process everything.

@matrixbot
Copy link
Collaborator Author

This comment was originally posted by @PaulosV at matrix-org/dendrite#2537 (comment).

@PaulosV Try a trigger to populate the notifications rules, such as for element android see: vector-im/element-android#6115 (comment) and #2484

I was trying to work out how to populate the rules, but I have tried to turn the notifications off and on several times, and the notifications rules were definitely present. And the notifications eventually worked, but not for the mentioned 1:1 chats.

Possibly related to Dendrite not sending the notification count to the push gateway - should be fixed by #2683. Does this still happen? If so, it may also be related to the push gateway (default matrix.org) being overloaded and takes some time to process everything.

I'll check but when I set the notifications to "All messages", it worked, so it was really something wrong with the "default" option - the original Element for Android did not have that option for 1:1 chats, instead there was an "All messages" and "None".
I also don't think it was a problem with overload, when the notification did come, it was instant, and when it did not come, it has never come after.

@matrixbot
Copy link
Collaborator Author

This comment was originally posted by @S7evinK at matrix-org/dendrite#2537 (comment).

Ah, okay.
Just remembered that there was #2705, which tweaked the 1:1 notification actions for encrypted rooms.
If it's still not working, it may be necessary to recreate the default rules provided by Dendrite. This can be done by deleting them from the database:

DELETE FROM userapi_account_datas WHERE type = 'm.push_rules' AND localpart = '$yourUserLocalpart'

They will be recreated on the next notification. You'll need to do an initial sync after that, so Element Android fetches the newly created rules.

If you say "All messages" and "None", those seem to be the normal options for encrypted rooms.

@matrixbot
Copy link
Collaborator Author

This comment was originally posted by @PaulosV at matrix-org/dendrite#2537 (comment).

Thanks for the tips, I've tried to update Dendrite to 0.10.4, removed the rules from the database, signed out and back in, and created an entirely new 1:1 E2E-encrypted direct messaging (it's over federation, btw). Still no push notifications in my SchildiChat (Android) without manually changing to "All messages" in the menu.

Edit: The 1:1 conversation was created via federation from Element on desktop.

@matrixbot
Copy link
Collaborator Author

This comment was originally posted by @PaulosV at matrix-org/dendrite#2537 (comment).

Actually, here's the interesting part now.

When I create the conversation on my Dendrite homeserver - either rfrom my SchildiChat Android, or the Element on desktop, then the notifications are set up correctly and they work on my Android! The SchildiChat client still shows "Default" for the notification settings, but it works.

But when I do it the other way around - I create the channel on the other end of the federation (Synapse homeserver), then I get no push notifications at Dendrite unless I change the setting from "Default" to "All notifications".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-User-API F-Push T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.
Projects
None yet
Development

No branches or pull requests

1 participant