From a4592bd522fa2e691a7da9b07ad7f522536d7cca Mon Sep 17 00:00:00 2001 From: levlam Date: Mon, 1 Nov 2021 17:22:42 +0300 Subject: [PATCH] Add messageChatJoinByRequest. --- td/generate/scheme/td_api.tl | 7 +++++-- td/telegram/MessageContent.cpp | 5 ++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index cbb074d76..521a5410b 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -1801,8 +1801,11 @@ messageChatDeletePhoto = MessageContent; //@description New chat members were added @member_user_ids User identifiers of the new members messageChatAddMembers member_user_ids:vector = MessageContent; -//@description A new member joined the chat by invite link @is_approved True, if the join request was approved by a chat administrator -messageChatJoinByLink is_approved:Bool = MessageContent; +//@description A new member joined the chat by invite link +messageChatJoinByLink = MessageContent; + +//@description A new member was accepted to the chat by an administrator +messageChatJoinByRequest = MessageContent; //@description A chat member was deleted @user_id User identifier of the deleted chat member messageChatDeleteMember user_id:int53 = MessageContent; diff --git a/td/telegram/MessageContent.cpp b/td/telegram/MessageContent.cpp index 0d38a6bd1..2a8f6f427 100644 --- a/td/telegram/MessageContent.cpp +++ b/td/telegram/MessageContent.cpp @@ -4887,7 +4887,10 @@ tl_object_ptr get_message_content_object(const MessageCo } case MessageContentType::ChatJoinedByLink: { const MessageChatJoinedByLink *m = static_cast(content); - return make_tl_object(m->is_approved); + if (m->is_approved) { + return make_tl_object(); + } + return make_tl_object(); } case MessageContentType::ChatDeleteUser: { const auto *m = static_cast(content);