alphapapa / ement.el

A Matrix client for GNU Emacs
GNU General Public License v3.0
476 stars 44 forks source link

Setting notification preferences from the transient menu does not work #224

Open rgri opened 9 months ago

rgri commented 9 months ago

OS/platform

NixOS 23.11.20230901.aa8aa7e (Tapir)

Emacs version and provenance

Tested on both:

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

alphapapa commented 9 months ago

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.

rgri commented 9 months ago

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.

alphapapa commented 9 months ago

Thanks. What homeserver are these accounts on?

alphapapa commented 9 months ago

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

rgri commented 9 months ago

Both accounts were registered on the matrix.org homeserver.

alphapapa commented 9 months ago

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.

rgri commented 9 months ago

Will do.

alphapapa commented 9 months ago

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

alphapapa commented 9 months ago

@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?