Add td_api::getSuitablePersonalChats.

This commit is contained in:
levlam 2024-03-29 00:12:54 +03:00
parent 93663c2542
commit 66522165ca
4 changed files with 13 additions and 0 deletions

View File

@ -7522,6 +7522,9 @@ getSuitableDiscussionChats = Chats;
//@description Returns a list of recently inactive supergroups and channels. Can be used when user reaches limit on the number of joined supergroups and channels and receives CHANNELS_TOO_MUCH error. Also, the limit can be increased with Telegram Premium
getInactiveSupergroupChats = Chats;
//@description Returns a list of channel chats, which can be used as a personal chat
getSuitablePersonalChats = Chats;
//@description Loads more Saved Messages topics. The loaded topics will be sent through updateSavedMessagesTopic. Topics are sorted by their topic.order in descending order. Returns a 404 error if all topics have been loaded
//@limit The maximum number of topics to be loaded. For optimal performance, the number of loaded topics is chosen by TDLib and can be smaller than the specified limit, even if the end of the list is not reached

View File

@ -5234,6 +5234,12 @@ void Td::on_request(uint64 id, const td_api::getInactiveSupergroupChats &request
CREATE_NO_ARGS_REQUEST(GetInactiveSupergroupChatsRequest);
}
void Td::on_request(uint64 id, const td_api::getSuitablePersonalChats &request) {
CHECK_IS_USER();
CREATE_REQUEST_PROMISE();
contacts_manager_->get_created_public_dialogs(PublicDialogType::ForPersonalDialog, std::move(promise), false);
}
void Td::on_request(uint64 id, td_api::searchRecentlyFoundChats &request) {
CHECK_IS_USER();
CLEAN_INPUT_STRING(request.query_);

View File

@ -742,6 +742,8 @@ class Td final : public Actor {
void on_request(uint64 id, const td_api::getInactiveSupergroupChats &request);
void on_request(uint64 id, const td_api::getSuitablePersonalChats &request);
void on_request(uint64 id, const td_api::openChat &request);
void on_request(uint64 id, const td_api::closeChat &request);

View File

@ -5446,6 +5446,8 @@ class CliClient final : public Actor {
send_request(td_api::make_object<td_api::getSuitableDiscussionChats>());
} else if (op == "gisc") {
send_request(td_api::make_object<td_api::getInactiveSupergroupChats>());
} else if (op == "gspc") {
send_request(td_api::make_object<td_api::getSuitablePersonalChats>());
} else if (op == "cpc") {
UserId user_id;
bool force;