diff --git a/td/telegram/MessagesManager.cpp b/td/telegram/MessagesManager.cpp index 37edfc2d..a29d971b 100644 --- a/td/telegram/MessagesManager.cpp +++ b/td/telegram/MessagesManager.cpp @@ -8217,13 +8217,13 @@ void MessagesManager::delete_messages(DialogId dialog_id, const vector deleted_message_ids; @@ -8288,8 +8288,7 @@ uint64 MessagesManager::save_delete_messages_from_server_logevent(DialogId dialo void MessagesManager::delete_messages_from_server(DialogId dialog_id, vector message_ids, bool revoke, uint64 logevent_id, Promise &&promise) { if (message_ids.empty()) { - promise.set_value(Unit()); - return; + return promise.set_value(Unit()); } LOG(INFO) << (revoke ? "Revoke " : "Delete ") << format::as_array(message_ids) << " in " << dialog_id << " from server"; @@ -8362,8 +8361,7 @@ uint64 MessagesManager::save_delete_scheduled_messages_from_server_logevent(Dial void MessagesManager::delete_scheduled_messages_from_server(DialogId dialog_id, vector message_ids, uint64 logevent_id, Promise &&promise) { if (message_ids.empty()) { - promise.set_value(Unit()); - return; + return promise.set_value(Unit()); } LOG(INFO) << "Delete " << format::as_array(message_ids) << " in " << dialog_id << " from server";