From 5bd66f9a769ec85242a0342ce364c437394c2f5c Mon Sep 17 00:00:00 2001 From: AlexeyZavar Date: Wed, 11 Sep 2024 21:58:14 +0300 Subject: [PATCH] fix: schedule tokenless bot start --- Telegram/SourceFiles/apiwrap.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Telegram/SourceFiles/apiwrap.cpp b/Telegram/SourceFiles/apiwrap.cpp index fe4c6fa92..12392a71f 100644 --- a/Telegram/SourceFiles/apiwrap.cpp +++ b/Telegram/SourceFiles/apiwrap.cpp @@ -3978,6 +3978,13 @@ void ApiWrap::sendBotStart( if (chat) { message.textWithTags.text += '@' + bot->username(); } + + const auto settings = &AyuSettings::getInstance(); + if (settings->useScheduledMessages) { + auto current = base::unixtime::now(); + message.action.options.scheduled = current + 12; + } + sendMessage(std::move(message)); return; }