From 84e7ff2637e06f5d7756c7b4e6d148a28a3b1ebf Mon Sep 17 00:00:00 2001 From: AlexeyZavar Date: Tue, 22 Oct 2024 00:28:38 +0300 Subject: [PATCH] fix: schedule stickers & set min for paid reactions --- Telegram/SourceFiles/boxes/sticker_set_box.cpp | 7 +++++++ .../SourceFiles/payments/payments_reaction_process.cpp | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/boxes/sticker_set_box.cpp b/Telegram/SourceFiles/boxes/sticker_set_box.cpp index ac48d91a10..cf271a888a 100644 --- a/Telegram/SourceFiles/boxes/sticker_set_box.cpp +++ b/Telegram/SourceFiles/boxes/sticker_set_box.cpp @@ -67,6 +67,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include // AyuGram includes +#include "ayu/ayu_settings.h" #include "ayu/utils/telegram_helpers.h" #include "styles/style_ayu_styles.h" #include "window/window_session_controller.h" @@ -1415,6 +1416,12 @@ void StickerSetBox::Inner::chosen( const auto animation = options.scheduled ? Ui::MessageSendingAnimationFrom() : messageSentAnimationInfo(index, sticker); + + if (AyuSettings::isUseScheduledMessages() && !options.scheduled) { + auto current = base::unixtime::now(); + options.scheduled = current + 12; + } + _show->processChosenSticker({ .document = sticker, .options = options, diff --git a/Telegram/SourceFiles/payments/payments_reaction_process.cpp b/Telegram/SourceFiles/payments/payments_reaction_process.cpp index 7050fa120a..dd971ec4fc 100644 --- a/Telegram/SourceFiles/payments/payments_reaction_process.cpp +++ b/Telegram/SourceFiles/payments/payments_reaction_process.cpp @@ -38,7 +38,7 @@ namespace Payments { namespace { constexpr auto kMaxPerReactionFallback = 2'500; -constexpr auto kDefaultPerReaction = 50; +constexpr auto kDefaultPerReaction = 1; void TryAddingPaidReaction( not_null session,