From bdc0423bf302da50f8f39f88fcb95db8e48d1c18 Mon Sep 17 00:00:00 2001 From: Sebastian Wolf Date: Sun, 19 Nov 2023 14:24:19 +0100 Subject: [PATCH] Make replies backward-compatible again --- src/tdlibwrapper.cpp | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/src/tdlibwrapper.cpp b/src/tdlibwrapper.cpp index 509e7cc..646ac20 100644 --- a/src/tdlibwrapper.cpp +++ b/src/tdlibwrapper.cpp @@ -411,19 +411,10 @@ QVariantMap TDLibWrapper::newSendMessageRequest(qlonglong chatId, qlonglong repl request.insert(_TYPE, "sendMessage"); request.insert(CHAT_ID, chatId); if (replyToMessageId) { - if (versionNumber > VERSION_NUMBER(1,8,14)) { - QVariantMap replyTo; - if (versionNumber > VERSION_NUMBER(1,8,20)) { - replyTo.insert(_TYPE, TYPE_INPUT_MESSAGE_REPLY_TO_MESSAGE); - } else { - replyTo.insert(_TYPE, TYPE_MESSAGE_REPLY_TO_MESSAGE); - } - replyTo.insert(CHAT_ID, chatId); - replyTo.insert(MESSAGE_ID, replyToMessageId); - request.insert(REPLY_TO, replyTo); - } else { - request.insert(REPLY_TO_MESSAGE_ID, replyToMessageId); - } + QVariantMap replyTo; + replyTo.insert(_TYPE, TYPE_INPUT_MESSAGE_REPLY_TO_MESSAGE); + replyTo.insert(MESSAGE_ID, replyToMessageId); + request.insert(REPLY_TO, replyTo); } return request; }