diff --git a/td/telegram/MessagesManager.cpp b/td/telegram/MessagesManager.cpp index 1d412c704..9a7bf71a0 100644 --- a/td/telegram/MessagesManager.cpp +++ b/td/telegram/MessagesManager.cpp @@ -17767,6 +17767,8 @@ void MessagesManager::send_update_chat_read_inbox(const Dialog *d, bool force, c << source; on_dialog_updated(d->dialog_id, source); if (!force && (running_get_difference_ || running_get_channel_difference(d->dialog_id))) { + LOG(INFO) << "Postpone updateChatReadInbox in " << d->dialog_id << "(" << get_dialog_title(d->dialog_id) << ") to " + << d->server_unread_count << " + " << d->local_unread_count << " from " << source; postponed_chat_read_inbox_updates_.insert(d->dialog_id); } else { postponed_chat_read_inbox_updates_.erase(d->dialog_id); diff --git a/td/telegram/td_json_client.h b/td/telegram/td_json_client.h index b036e9525..a5db0dfb3 100644 --- a/td/telegram/td_json_client.h +++ b/td/telegram/td_json_client.h @@ -68,6 +68,8 @@ TDJSON_EXPORT void td_json_client_send(void *client, const char *request); /** * Receives incoming updates and request responses from the TDLib client. May be called from any thread, but * shouldn't be called simultaneously from two different threads. + * Returned pointer will be deallocated by TDLib during next call to td_json_client_receive or td_json_client_execute + * in the same thread, so it can't be used after that. * \param[in] client The client. * \param[in] timeout Maximum number of seconds allowed for this function to wait for new data. * \return JSON-serialized null-terminated incoming update or request response. May be NULL if the timeout expires. @@ -77,6 +79,8 @@ TDJSON_EXPORT const char *td_json_client_receive(void *client, double timeout); /** * Synchronously executes TDLib request. May be called from any thread. * Only a few requests can be executed synchronously. + * Returned pointer will be deallocated by TDLib during next call to td_json_client_receive or td_json_client_execute + * in the same thread, so it can't be used after that. * \param[in] client The client. * \param[in] request JSON-serialized null-terminated request to TDLib. * \return JSON-serialized null-terminated request response. May be NULL if the request can't be parsed.