Skip to content

Commit

Permalink
Fix for M-g * command to goto favorite message in a chatbuf
Browse files Browse the repository at this point in the history
  • Loading branch information
zevlg committed Dec 15, 2024
1 parent 9459977 commit 3f6f452
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions telega-chat.el
Original file line number Diff line number Diff line change
Expand Up @@ -4968,14 +4968,14 @@ from message at point."
(defun telega-chat-favorite-messages (chat)
"Return entries from the `telega--favorite-messages' for the CHAT."
(cl-remove (plist-get chat :id) telega--favorite-messages
:test-not 'eq :key #'car))
:test-not 'eq :key (telega--tl-prop :chat_id)))

(defun telega-chatbuf-next-favorite ()
"Goto next favorite message."
(interactive)
(let* ((fav-ids
;; NOTE: Sort favorite messages ids by id decreasing order
(sort (mapcar #'cadr
(sort (mapcar (telega--tl-prop :id)
(telega-chat-favorite-messages telega-chatbuf--chat))
#'>))
(next-fav-id
Expand Down

0 comments on commit 3f6f452

Please sign in to comment.