mirror of
https://github.com/tdlight-team/tdlight-telegram-bot-api.git
synced 2024-11-23 04:06:49 +01:00
tdlight is no more
This commit is contained in:
parent
a1510e45bb
commit
3e79d99dfc
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,3 +4,4 @@
|
||||
bin/
|
||||
vcpkg/
|
||||
/.idea/
|
||||
.cache/*
|
||||
|
2
.gitmodules
vendored
2
.gitmodules
vendored
@ -1,3 +1,3 @@
|
||||
[submodule "td"]
|
||||
path = td
|
||||
url = https://github.com/tdlight-team/tdlight.git
|
||||
url = https://github.com/tdlib/td
|
||||
|
2
td
2
td
@ -1 +1 @@
|
||||
Subproject commit 1ea79d273976c22655742d4031ebbe62dba6cd7c
|
||||
Subproject commit cf2be88c34b1b844fb9c2cdf28c3b5f0cce6be6b
|
@ -2324,9 +2324,11 @@ class Client::JsonChatMember : public Jsonable {
|
||||
object("inviter", JsonUser(member_->inviter_user_id_, client_));
|
||||
}
|
||||
|
||||
/*
|
||||
if (member_->bot_info_ != nullptr) {
|
||||
//for the future
|
||||
}
|
||||
*/
|
||||
|
||||
switch (member_->status_->get_id()) {
|
||||
case td_api::chatMemberStatusCreator::ID: {
|
||||
@ -2403,8 +2405,8 @@ class Client::JsonChatMembers : public Jsonable {
|
||||
if (member->member_id_->get_id() != td_api::messageSenderUser::ID) {
|
||||
continue;
|
||||
}
|
||||
auto user_id = static_cast<const td_api::messageSenderUser *>(member->member_id_.get())->user_id_;
|
||||
/*
|
||||
auto user_id = static_cast<const td_api::messageSenderUser *>(member->member_id_.get())->user_id_;
|
||||
bool is_member_bot = member->bot_info_ != nullptr;
|
||||
if (!is_member_bot) {
|
||||
// bot info may be unknown
|
||||
@ -3743,10 +3745,11 @@ class Client::TdOnGetMemoryStatisticsCallback : public TdQueryCallback {
|
||||
if (result->get_id() == td_api::error::ID) {
|
||||
return fail_query_with_error(std::move(query_), move_object_as<td_api::error>(result));
|
||||
}
|
||||
|
||||
/*
|
||||
auto res = move_object_as<td_api::memoryStatistics>(result);
|
||||
|
||||
answer_query(td::JsonRaw(res->statistics_), std::move(query_));
|
||||
*/
|
||||
}
|
||||
|
||||
private:
|
||||
@ -3959,9 +3962,7 @@ void Client::start_up() {
|
||||
set_context(context);
|
||||
set_tag(bot_token_id_);
|
||||
|
||||
auto r_absolute_dir = td::realpath(td::string(".") + TD_DIR_SLASH, true);
|
||||
CHECK(r_absolute_dir.is_ok());
|
||||
absolute_dir_ = r_absolute_dir.move_as_ok();
|
||||
|
||||
auto suff = bot_token_with_dc_ + TD_DIR_SLASH;
|
||||
if (!parameters_->allow_colon_in_filenames_) {
|
||||
for (auto &c : suff) {
|
||||
@ -8072,9 +8073,11 @@ td::Status Client::process_get_chat_member_count_query(PromisedQueryPtr &query)
|
||||
}
|
||||
|
||||
td::Status Client::process_optimize_memory_query(PromisedQueryPtr &query) {
|
||||
/*
|
||||
disable_internet_connection(std::move(query), [this](PromisedQueryPtr query) {
|
||||
optimize_memory(std::move(query), [this](PromisedQueryPtr query) { enable_internet_connection(std::move(query)); });
|
||||
});
|
||||
*/
|
||||
return Status::OK();
|
||||
}
|
||||
|
||||
@ -8092,8 +8095,10 @@ void Client::enable_internet_connection(PromisedQueryPtr query) {
|
||||
|
||||
template <class OnSuccess>
|
||||
void Client::optimize_memory(PromisedQueryPtr query, OnSuccess on_success) {
|
||||
/*
|
||||
send_request(make_object<td_api::optimizeMemory>(),
|
||||
std::make_unique<TdOnOptimizeMemoryCallback<OnSuccess>>(this, std::move(query), std::move(on_success)));
|
||||
*/
|
||||
}
|
||||
|
||||
td::Status Client::process_leave_chat_query(PromisedQueryPtr &query) {
|
||||
@ -8626,8 +8631,10 @@ td::Status Client::process_ping_query(PromisedQueryPtr &query) {
|
||||
}
|
||||
|
||||
td::Status Client::process_get_memory_stats_query(PromisedQueryPtr &query) {
|
||||
/*
|
||||
send_request(make_object<td_api::getMemoryStatistics>(),
|
||||
std::make_unique<TdOnGetMemoryStatisticsCallback>(std::move(query)));
|
||||
*/
|
||||
return Status::OK();
|
||||
}
|
||||
//end custom methods impl
|
||||
|
@ -105,7 +105,7 @@ void ClientManager::send(PromisedQueryPtr query) {
|
||||
auto webhook_info = parameters_->shared_data_->webhook_db_->get(bot_token_with_dc);
|
||||
if (!webhook_info.empty()) {
|
||||
send_closure(client_info->client_, &Client::send,
|
||||
get_webhook_restore_query(bot_token_with_dc, query->is_user() webhook_info, parameters_->shared_data_));
|
||||
get_webhook_restore_query(bot_token_with_dc, query->is_user(), webhook_info, parameters_->shared_data_));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user