Add td_api::removeSearchedForHashtag.

This commit is contained in:
levlam 2024-05-25 20:23:33 +03:00
parent 57186fca18
commit c1873564dc
4 changed files with 16 additions and 0 deletions

View File

@ -8074,6 +8074,9 @@ searchPublicHashtagMessages hashtag:string offset:string limit:int32 = FoundMess
//@description Returns recently searched for hashtags by their prefix @prefix Prefix of hashtags to return @limit The maximum number of hashtags to be returned
getSearchedForHashtags prefix:string limit:int32 = Hashtags;
//@description Removes a hashtag from the list of recently searched for hashtags @hashtag Hashtag to delete
removeSearchedForHashtag hashtag:string = Ok;
//@description Deletes all call messages @revoke Pass true to delete the messages for all users
deleteAllCallMessages revoke:Bool = Ok;

View File

@ -5381,6 +5381,13 @@ void Td::on_request(uint64 id, td_api::getSearchedForHashtags &request) {
std::move(query_promise));
}
void Td::on_request(uint64 id, td_api::removeSearchedForHashtag &request) {
CHECK_IS_USER();
CLEAN_INPUT_STRING(request.hashtag_);
CREATE_OK_REQUEST_PROMISE();
send_closure(hashtag_search_hints_, &HashtagHints::remove_hashtag, std::move(request.hashtag_), std::move(promise));
}
void Td::on_request(uint64 id, const td_api::deleteAllCallMessages &request) {
CHECK_IS_USER();
CREATE_OK_REQUEST_PROMISE();

View File

@ -798,6 +798,8 @@ class Td final : public Actor {
void on_request(uint64 id, td_api::getSearchedForHashtags &request);
void on_request(uint64 id, td_api::removeSearchedForHashtag &request);
void on_request(uint64 id, const td_api::deleteAllCallMessages &request);
void on_request(uint64 id, const td_api::searchChatRecentLocationMessages &request);

View File

@ -3069,6 +3069,10 @@ class CliClient final : public Actor {
string limit;
get_args(args, hashtag, limit);
send_request(td_api::make_object<td_api::getSearchedForHashtags>(hashtag, as_limit(limit)));
} else if (op == "rsfh") {
string hashtag;
get_args(args, hashtag);
send_request(td_api::make_object<td_api::removeSearchedForHashtag>(hashtag));
} else if (op == "DeleteAllCallMessages") {
bool revoke = as_bool(args);
send_request(td_api::make_object<td_api::deleteAllCallMessages>(revoke));