zevlg / telega.el

GNU Emacs telegram client (unofficial)
https://zevlg.github.io/telega.el/
GNU General Public License v3.0
1.09k stars 85 forks source link

Ignored messages re-appear after they are deleted, (`telega-chat-show-deleted-messages-for` is non nil) #342

Closed yangsheng6810 closed 2 years ago

yangsheng6810 commented 2 years ago

Telega Setup

OS: Arch Linux Emacs: GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.30, cairo version 1.17.4) Telega: telega v0.8.0 (TDLib v1.8.0) (telega-server v0.7.13)

Current Behavior

In a group chat, I am seeing the deleted messages from a blocked user (the messages were not shown before they were deleted).

Expected Behavior

No message from a blocked user is shown.

Steps to Reproduce

  1. (setq telega-chat-show-deleted-messages-for '(not saved-messages))
  2. (add-hook 'telega-msg-ignore-predicates 'telega-msg-from-blocked-sender-p)
  3. Wait for a blocked user to send and then delete a message.
  4. The message is shown with highlight.

Possible Solution

Make hook telega-msg-ignore-predicates run after highlighting deleted messages.