diff --git a/example/README.md b/example/README.md index 7bdbd7fef..1fdabe5ac 100644 --- a/example/README.md +++ b/example/README.md @@ -91,7 +91,7 @@ You can also see [JTDLib](https://github.com/ErnyTech/JTDLib) for another exampl ## Using TDLib in Kotlin projects -TDLib can be used from the Kotlin/JVM programming language through same way as in [JAVA](#java). +TDLib can be used from the Kotlin/JVM programming language through same way as in [Java](#java). You can also use [ktd](https://github.com/whyoleg/ktd) library with kotlin specific bindings. diff --git a/td/telegram/MessagesManager.cpp b/td/telegram/MessagesManager.cpp index 9303b2881..c00f14406 100644 --- a/td/telegram/MessagesManager.cpp +++ b/td/telegram/MessagesManager.cpp @@ -12578,10 +12578,9 @@ unique_ptr MessagesManager::do_delete_message(Dialog * return nullptr; } - LOG_CHECK(!d->being_deleted_message_id.is_valid()) << d->being_deleted_message_id << " " << message_id << " " - << d->debug_being_deleted_message_id_source << " " << source; + LOG_CHECK(!d->being_deleted_message_id.is_valid()) + << d->being_deleted_message_id << " " << message_id << " " << source; d->being_deleted_message_id = message_id; - d->debug_being_deleted_message_id_source = source; if (is_debug_message_op_enabled()) { d->debug_message_op.emplace_back(Dialog::MessageOp::Delete, m->message_id, m->content->get_type(), false, @@ -12708,7 +12707,6 @@ unique_ptr MessagesManager::do_delete_message(Dialog * auto result = treap_delete_message(v); d->being_deleted_message_id = MessageId(); - d->debug_being_deleted_message_id_source = ""; if (!only_from_memory) { if (need_get_history && !td_->auth_manager_->is_bot() && have_input_peer(d->dialog_id, AccessRights::Read)) { @@ -25810,7 +25808,7 @@ MessagesManager::Message *MessagesManager::add_message_to_dialog(Dialog *d, uniq if (message_id.is_server()) { if (d->being_added_message_id.is_valid()) { // if a too new message not from update has failed to preload before being_added_message_id was set, - // then it should fail to load event after it is set and last_new_message_id has changed + // then it should fail to load even after it is set and last_new_message_id has changed max_message_id = d->being_updated_last_new_message_id; } else { max_message_id = d->last_new_message_id; @@ -26012,19 +26010,13 @@ MessagesManager::Message *MessagesManager::add_message_to_dialog(Dialog *d, uniq // there must be no two recursive calls to add_message_to_dialog LOG_CHECK(!d->being_added_message_id.is_valid()) << d->dialog_id << " " << d->being_added_message_id << " " << message_id << " " << *need_update << " " - << d->debug_being_added_need_update << " " << d->pinned_message_notification_message_id << " " - << preloaded_pinned_message_id << " " << d->debug_preloaded_pinned_message_id << " " - << d->debug_added_pinned_message_id << " " << d->debug_add_message_to_dialog_fail_reason << " " << source; - LOG_CHECK(!d->being_deleted_message_id.is_valid()) << d->being_deleted_message_id << " " << message_id << " " - << d->debug_being_deleted_message_id_source << " " << source; + << d->pinned_message_notification_message_id << " " << preloaded_pinned_message_id << " " << source; + LOG_CHECK(!d->being_deleted_message_id.is_valid()) + << d->being_deleted_message_id << " " << message_id << " " << source; d->being_added_message_id = message_id; d->being_updated_last_new_message_id = d->last_new_message_id; d->being_updated_last_database_message_id = d->last_database_message_id; - d->debug_being_added_need_update = *need_update; - d->debug_preloaded_pinned_message_id = preloaded_pinned_message_id; - d->debug_added_pinned_message_id = added_pinned_message_id; - d->debug_add_message_to_dialog_fail_reason = add_error_reason; if (d->new_secret_chat_notification_id.is_valid()) { remove_new_secret_chat_notification(d, true); diff --git a/td/telegram/MessagesManager.h b/td/telegram/MessagesManager.h index 122d2027d..3220080ca 100644 --- a/td/telegram/MessagesManager.h +++ b/td/telegram/MessagesManager.h @@ -1069,11 +1069,6 @@ class MessagesManager : public Actor { MessageId being_updated_last_new_message_id; MessageId being_updated_last_database_message_id; MessageId being_deleted_message_id; - const char *debug_being_deleted_message_id_source = ""; - bool debug_being_added_need_update = false; // TODO remove - MessageId debug_preloaded_pinned_message_id; // TODO remove - MessageId debug_added_pinned_message_id; // TODO remove - const char *debug_add_message_to_dialog_fail_reason = ""; NotificationGroupInfo message_notification_group; NotificationGroupInfo mention_notification_group;