ement.el icon indicating copy to clipboard operation
ement.el copied to clipboard

Setting notification preferences from the transient menu does not work

Open yliceee opened this issue 2 years ago • 9 comments

OS/platform

NixOS 23.11.20230901.aa8aa7e (Tapir)

Emacs version and provenance

Tested on both:

  • GNU Emacs 29.1 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0, Xaw3d scroll bars)
  • GNU Emacs 28.2 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0, Xaw3d scroll bars) Installed using with-emacs.sh, from the Nixpkgs repos:
  1. nix-shell -p emacs or nix-shell -p emacs29 -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/976fa3369d722e76f37c77493d99829540d43845.tar.gz depending on version.
  2. ./with-emacs.sh -i ement

Emacs command

./with-emacs.sh -i ement

Emacs frame type

GUI and tty

Actions taken

  1. Run ./with-emacs.sh -i ement
  2. Type M-x ement-connect RET
  3. Login to my matrix.org account
  4. Enter a room
  5. Type ?
  6. Type r n
  7. Type None RET or Mentions RET at the prompt

Results

Desktop notifications continued to be received regardless of content or notification preferences.

Expected results

  1. On typing None RET No longer receiving any desktop notifications.
  2. On typing Mentions RET Receiving only desktop notifications for messages mentioning me.

Backtrace

No response

Etc.

No response

yliceee avatar Sep 25 '23 20:09 yliceee

Hi Robert,

Thanks for the report. AFAICT this works for me, so I'm not sure what the problem could be. And if I can't reproduce it, it will be much harder to solve.

If you happen to have another Matrix account, or if you'd be willing to register one, please try to reproduce the problem on that account. There are some known issues with "stuck notifications" in Matrix, but it's not clear to me whether it's entirely a client-side issue (known to happen with Element Web) or also depends on server-side fixes.

alphapapa avatar Sep 25 '23 23:09 alphapapa

I registered an entirely new matrix account using the Element web client. I then followed all of the steps in the OP, but instead I used C-u M-x ement-connect so I could log in with my newly created account, and joined a popular room. I experienced the same issue described in the OP.

I also noticed that the colored option for "Notifications" in the transient menu does not update to reflect setting my notification preferences to "None". This happened on the account I initially found the issue on as well.

yliceee avatar Sep 27 '23 15:09 yliceee

Thanks. What homeserver are these accounts on?

alphapapa avatar Sep 27 '23 18:09 alphapapa

Possibly related to this relatively recent change: https://github.com/alphapapa/ement.el/pull/190

alphapapa avatar Sep 27 '23 18:09 alphapapa

Both accounts were registered on the matrix.org homeserver.

yliceee avatar Sep 27 '23 18:09 yliceee

Unfortunately, since I'm unable to reproduce this problem, it will likely require a live debugging session where I can send you code to evaluate and show me the results of. I'm guessing there's something unexpected in the room's notification state or actions data. If you would, please join #ement.el:matrix.org and maybe we can find time to collaborate on this problem sometime soon.

alphapapa avatar Sep 27 '23 19:09 alphapapa

Will do.

yliceee avatar Sep 28 '23 02:09 yliceee

Let me also ask, does this happen in every room, or only some? How many have you tried this in?

alphapapa avatar Sep 28 '23 02:09 alphapapa

@rgri I see that you left the #ement.el:matrix.org room and rejected my private message asking about debugging this further. You had said earlier that you'd be glad to work on this together. I don't understand. Did something go wrong?

alphapapa avatar Oct 02 '23 05:10 alphapapa