Allow getStarTransactions for bots.

This commit is contained in:
levlam 2024-06-14 14:20:25 +03:00
parent f4a64ad28c
commit 9288aa5f16
2 changed files with 4 additions and 1 deletions

View File

@ -6,6 +6,7 @@
//
#include "td/telegram/StarManager.h"
#include "td/telegram/AuthManager.h"
#include "td/telegram/ChatManager.h"
#include "td/telegram/DialogId.h"
#include "td/telegram/DialogManager.h"
@ -84,6 +85,9 @@ class GetStarsTransactionsQuery final : public Td::ResultHandler {
UNREACHABLE();
}
}
if (td_->auth_manager_->is_bot()) {
flags |= telegram_api::payments_getStarsTransactions::ASCENDING_MASK;
}
send_query(G()->net_query_creator().create(telegram_api::payments_getStarsTransactions(
flags, false /*ignored*/, false /*ignored*/, false /*ignored*/, std::move(input_peer), offset, limit)));
}

View File

@ -9498,7 +9498,6 @@ void Td::on_request(uint64 id, const td_api::getStarPaymentOptions &request) {
}
void Td::on_request(uint64 id, td_api::getStarTransactions &request) {
CHECK_IS_USER();
CLEAN_INPUT_STRING(request.offset_);
CREATE_REQUEST_PROMISE();
star_manager_->get_star_transactions(std::move(request.owner_id_), request.offset_, request.limit_,