Skip to content

Commit

Permalink
[contrib] [tdlib 1.8.21] rename messageForward* -> message*
Browse files Browse the repository at this point in the history
  • Loading branch information
BlindingDark committed Nov 17, 2023
1 parent 08441b4 commit a0becfa
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 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
4 changes: 2 additions & 2 deletions contrib/telega-bridge-bot.el
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ Will update CHAT-ID MSG-ID when download completed."
(when-let* ((msg-id (telega--tl-get msg :id))
(chat-id (telega--tl-get msg :chat_id))
(forward-info (telega--tl-get msg :forward_info))
(fwd-info-p (eq (telega--tl-type forward-info) 'messageForwardInfo))
(fwd-info-p (eq (telega--tl-type forward-info) 'messageInfo))
(bot-id (telega--tl-get forward-info :origin :sender_user_id))
(counterparty-info (telega-bridge-bot--counterparty-info chat-id bot-id)) ; check if it is a bridge bot
(counterparty-type (plist-get counterparty-info :type))
Expand All @@ -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 a0becfa

Please sign in to comment.