Allow getStarTransactions for bots.
This commit is contained in:
parent
f4a64ad28c
commit
9288aa5f16
@ -6,6 +6,7 @@
|
|||||||
//
|
//
|
||||||
#include "td/telegram/StarManager.h"
|
#include "td/telegram/StarManager.h"
|
||||||
|
|
||||||
|
#include "td/telegram/AuthManager.h"
|
||||||
#include "td/telegram/ChatManager.h"
|
#include "td/telegram/ChatManager.h"
|
||||||
#include "td/telegram/DialogId.h"
|
#include "td/telegram/DialogId.h"
|
||||||
#include "td/telegram/DialogManager.h"
|
#include "td/telegram/DialogManager.h"
|
||||||
@ -84,6 +85,9 @@ class GetStarsTransactionsQuery final : public Td::ResultHandler {
|
|||||||
UNREACHABLE();
|
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(
|
send_query(G()->net_query_creator().create(telegram_api::payments_getStarsTransactions(
|
||||||
flags, false /*ignored*/, false /*ignored*/, false /*ignored*/, std::move(input_peer), offset, limit)));
|
flags, false /*ignored*/, false /*ignored*/, false /*ignored*/, std::move(input_peer), offset, limit)));
|
||||||
}
|
}
|
||||||
|
@ -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) {
|
void Td::on_request(uint64 id, td_api::getStarTransactions &request) {
|
||||||
CHECK_IS_USER();
|
|
||||||
CLEAN_INPUT_STRING(request.offset_);
|
CLEAN_INPUT_STRING(request.offset_);
|
||||||
CREATE_REQUEST_PROMISE();
|
CREATE_REQUEST_PROMISE();
|
||||||
star_manager_->get_star_transactions(std::move(request.owner_id_), request.offset_, request.limit_,
|
star_manager_->get_star_transactions(std::move(request.owner_id_), request.offset_, request.limit_,
|
||||||
|
Loading…
Reference in New Issue
Block a user