From a68e75ef366d0b3f43b96aac5f5044217e2b6540 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=91=E6=B2=A1=E6=9C=89=E6=8A=93=E7=8B=82?= Date: Fri, 17 Nov 2023 16:28:12 +0800 Subject: [PATCH] [contrib] [tdlib 1.8.21] rename messageForward* -> message* (#448) * [contrib] [tdlib 1.8.21] rename messageForward* -> message* * Keep messageForwardInfo --- contrib/telega-adblock.el | 2 +- contrib/telega-bridge-bot.el | 2 +- contrib/telega-emacs-stories.el | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/telega-adblock.el b/contrib/telega-adblock.el index 8f5dae6..c04cab9 100644 --- a/contrib/telega-adblock.el +++ b/contrib/telega-adblock.el @@ -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 diff --git a/contrib/telega-bridge-bot.el b/contrib/telega-bridge-bot.el index 6f9995d..a9d0d70 100644 --- a/contrib/telega-bridge-bot.el +++ b/contrib/telega-bridge-bot.el @@ -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 diff --git a/contrib/telega-emacs-stories.el b/contrib/telega-emacs-stories.el index c27da50..9d49f55 100644 --- a/contrib/telega-emacs-stories.el +++ b/contrib/telega-emacs-stories.el @@ -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))))