ars3niy / tdlib-purple

libpurple Telegram plugin using tdlib
Other
147 stars 29 forks source link

TdLib 1.7.10 breaks us again :-( #131

Closed SchweinDeBurg closed 2 years ago

SchweinDeBurg commented 2 years ago

Commit acc43bb0b5990a5b1fb7d446ef2e7086ece08443 "Allow typings by chats and rename updateUserChatAction to updateChatAction" is now show-stopper because of following API change:

diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl
index 298bab53..91092029 100644
--- a/td/generate/scheme/td_api.tl
+++ b/td/generate/scheme/td_api.tl
@@ -3800,8 +3800,8 @@ updateHavePendingNotifications have_delayed_notifications:Bool have_unreceived_n
 //@from_cache True, if the messages are deleted only from the cache and can possibly be retrieved again in the future
 updateDeleteMessages chat_id:int53 message_ids:vector<int53> is_permanent:Bool from_cache:Bool = Update;

-//@description User activity in the chat has changed @chat_id Chat identifier @message_thread_id If not 0, a message thread identifier in which the action was performed @user_id Identifier of a user performing an action @action The acti
-updateUserChatAction chat_id:int53 message_thread_id:int53 user_id:int53 action:ChatAction = Update;
+//@description A message sender activity in the chat has changed @chat_id Chat identifier @message_thread_id If not 0, a message thread identifier in which the action was performed @sender_id Identifier of a message sender performing th
+updateChatAction chat_id:int53 message_thread_id:int53 sender_id:MessageSender action:ChatAction = Update;

 //@description The user went online or offline @user_id User identifier @status New status of the user
 updateUserStatus user_id:int53 status:UserStatus = Update;
ars3niy commented 2 years ago

While this particular instance could be solved with an #if, such solutions won't last long since they keep changing the API. The only long-term solution is this https://github.com/ars3niy/tdlib-purple/commit/f7829a498ac4c0f359bbfdf1001e274196ef2069