zevlg / telega.el

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

Ignore messages from blocked senders not work until expelicitly checked their profile #310

Closed yangsheng6810 closed 3 years ago

yangsheng6810 commented 3 years ago

Telega Setup

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

Current Behavior

After setting (add-hook 'telega-msg-ignore-predicates #'telega-msg-from-blocked-sender-p), messages sent by blocked users are still shown. Blocking of a user only start to work after I explicitly check the profile of him, and to block multiple users, I have to check the profile of every one of them.

Steps to Reproduce

  1. Block some user/users in Telegram
  2. Set (add-hook 'telega-msg-ignore-predicates #'telega-msg-from-blocked-sender-p)
  3. Start telega, and navigate to a group chat in which some blocked user has sent some messages. Such messages are visible. To hide them, I have to check the profile of such user explicitly, and re-open the current group chat.

Possible Solution

At the start of telega, pull in the list of all blocked users. Related to https://github.com/tdlib/td/issues/1669

zevlg commented 3 years ago

Should be fixed in master, please check

yangsheng6810 commented 3 years ago

Works for me. Thanks!