mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Suggest premium when sending existing quick replies.
This commit is contained in:
parent
6d352597b4
commit
0a8e961142
1 changed files with 8 additions and 3 deletions
|
@ -20,6 +20,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "boxes/share_box.h"
|
||||
#include "boxes/edit_caption_box.h"
|
||||
#include "boxes/premium_limits_box.h"
|
||||
#include "boxes/premium_preview_box.h"
|
||||
#include "boxes/peers/edit_peer_permissions_box.h" // ShowAboutGigagroup.
|
||||
#include "boxes/peers/edit_peer_requests_box.h"
|
||||
#include "core/file_utilities.h"
|
||||
|
@ -439,12 +440,16 @@ HistoryWidget::HistoryWidget(
|
|||
&& data.method != Method::ByTab)
|
||||
? messages->lookupShortcutId(data.command.mid(1))
|
||||
: BusinessShortcutId();
|
||||
if (shortcutId) {
|
||||
if (!shortcutId) {
|
||||
insertHashtagOrBotCommand(data.command, data.method);
|
||||
} else if (!_peer->session().premium()) {
|
||||
ShowPremiumPreviewToBuy(
|
||||
controller,
|
||||
PremiumFeature::QuickReplies);
|
||||
} else {
|
||||
session().api().sendShortcutMessages(_peer, shortcutId);
|
||||
session().api().finishForwarding(prepareSendAction({}));
|
||||
setFieldText(_field->getTextWithTagsPart(_field->textCursor().position()));
|
||||
} else {
|
||||
insertHashtagOrBotCommand(data.command, data.method);
|
||||
}
|
||||
}, lifetime());
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue