mirror of
https://github.com/tdlight-team/tdlight-telegram-bot-api.git
synced 2024-11-27 06:06:47 +01:00
td splits automatically
This commit is contained in:
parent
cb7dcb5c0b
commit
fc0a6e10cc
@ -7476,15 +7476,9 @@ td::Status Client::process_delete_messages_query(PromisedQueryPtr &query) {
|
||||
}
|
||||
|
||||
td::vector<td::int64> ids;
|
||||
ids.reserve(200);
|
||||
ids.reserve(end-start+1);
|
||||
for (td::int32 i = start; i <= end; i++) {
|
||||
ids.push_back(as_tdlib_message_id(i));
|
||||
|
||||
if (ids.size() == 200) {
|
||||
send_request(make_object<td_api::deleteMessages>(chat_id, std::move(ids), true),
|
||||
std::make_unique<TdOnOkCallback>());
|
||||
ids.clear();
|
||||
}
|
||||
}
|
||||
|
||||
if (ids.size() != 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user