Telegram bot settings page template updated. Linking status added. Notification about disabled linking when turning on subscribers notifications.
This commit is contained in:
parent
9a0d374baf
commit
3db25e9bdb
|
@ -1,9 +1,12 @@
|
|||
{# @var account \Skobkin\Bundle\PointToolsBundle\Entity\Telegram\Account #}
|
||||
*Your current settings:*
|
||||
|
||||
Account /link status: {% if account.user %}Linked to {{ account.user.login }}{% else %}Not linked{% endif %}
|
||||
|
||||
User renaming notifications: {% if account.renameNotification %}enabled{% else %}disabled{% endif %}
|
||||
|
||||
Subscribers notifications: {% if account.subscriberNotification %}enabled{% else %}disabled{% endif %}
|
||||
{% if not account.user %}(Not active because account is not linked){% endif %}
|
||||
|
||||
|
||||
Choose what to change.
|
|
@ -243,6 +243,10 @@ class PrivateMessageProcessor
|
|||
$this->em->flush();
|
||||
|
||||
$this->messenger->sendMessage($account, 'Subscribers notifications are turned '.($account->isSubscriberNotification() ? 'on' : 'off'));
|
||||
|
||||
if ($account->isSubscriberNotification() && null === $account->getUser()) {
|
||||
$this->messenger->sendMessage($account, 'You need to /link you account to receive these notifications.');
|
||||
}
|
||||
} else {
|
||||
$this->sendError($account, 'Notification type does not exist.');
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue