Don't send empty DeleteQuickReplyMessagesQuery.

This commit is contained in:
levlam 2024-04-17 14:31:36 +03:00
parent 48be50a0e3
commit 8e4a241c7f

View File

@ -1180,6 +1180,9 @@ void QuickReplyManager::delete_quick_reply_shortcut_messages(QuickReplyShortcutI
void QuickReplyManager::delete_quick_reply_messages_on_server(QuickReplyShortcutId shortcut_id,
const vector<MessageId> &message_ids,
Promise<Unit> &&promise) {
if (message_ids.empty()) {
return promise.set_value(Unit());
}
td_->create_handler<DeleteQuickReplyMessagesQuery>(std::move(promise))->send(shortcut_id, message_ids);
}