From f46ff6e1cdc48914d7c1ce6c30b340415454ca7e Mon Sep 17 00:00:00 2001 From: levlam Date: Fri, 5 Feb 2021 19:23:29 +0300 Subject: [PATCH] Update permanent invite link after it is revoked. --- td/telegram/ContactsManager.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/td/telegram/ContactsManager.cpp b/td/telegram/ContactsManager.cpp index a8d7d18d0..12eb411f8 100644 --- a/td/telegram/ContactsManager.cpp +++ b/td/telegram/ContactsManager.cpp @@ -1910,6 +1910,10 @@ class RevokeChatInviteLinkQuery : public Td::ResultHandler { if (!invite_link.is_valid() || !new_invite_link.is_valid()) { return on_error(id, Status::Error(500, "Receive invalid invite link")); } + if (new_invite_link.get_administrator_user_id() == td->contacts_manager_->get_my_id() && + new_invite_link.is_permanent()) { + td->contacts_manager_->on_get_permanent_dialog_invite_link(dialog_id_, new_invite_link); + } links.push_back(invite_link.get_chat_invite_link_object(td->contacts_manager_.get())); links.push_back(new_invite_link.get_chat_invite_link_object(td->contacts_manager_.get())); break;