Skip to content

Commit

Permalink
[contrib] [tdlib 1.8.21] rename messageForward* -> message* (#448)
Browse files Browse the repository at this point in the history
* [contrib] [tdlib 1.8.21] rename messageForward* -> message*

* Keep messageForwardInfo
  • Loading branch information
BlindingDark committed Nov 17, 2023
1 parent 08441b4 commit a68e75e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion contrib/telega-adblock.el
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ an URL."
(defun telega-adblock-msg-forwarded-p (msg)
"Return non-nil if MSG is forwarded from another channel."
(when-let ((fwd-origin (telega--tl-get msg :forward_info :origin))
(orig-chat-id (when (equal "messageForwardOriginChannel"
(orig-chat-id (when (equal "messageOriginChannel"
(plist-get fwd-origin :@type))
(plist-get fwd-origin :chat_id))))
;; Allow self-forwards
Expand Down
2 changes: 1 addition & 1 deletion contrib/telega-bridge-bot.el
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ Will update CHAT-ID MSG-ID when download completed."
(body (cadr name-and-body))) ; skip if no body
(let ((sender-id (telega-bridge-bot--update-user-info msg-id chat-id bot-id name)))
;; replace sender
(plist-put forward-info :origin (list :@type "messageForwardOriginUser" :sender_user_id sender-id))
(plist-put forward-info :origin (list :@type "messageOriginUser" :sender_user_id sender-id))
;; remove duplicated username in body
(plist-put
content :text
Expand Down
4 changes: 2 additions & 2 deletions contrib/telega-emacs-stories.el
Original file line number Diff line number Diff line change
Expand Up @@ -433,9 +433,9 @@ If STORY-MESSAGES is not specified, unview all story messages."
Return featured chat id, if MSG is featured."
(when-let* ((origin (telega--tl-get msg :forward_info :origin))
(chat-id (cl-case (telega--tl-type origin)
(messageForwardOriginChat
(messageOriginChat
(plist-get origin :sender_chat_id))
(messageForwardOriginChannel
(messageOriginChannel
(plist-get origin :chat_id)))))
(car (memq chat-id telega-emacs-stories--featured-chat-ids))))

Expand Down

0 comments on commit a68e75e

Please sign in to comment.