diff --git a/src/Skobkin/Bundle/PointToolsBundle/Resources/views/Telegram/settings.md.twig b/src/Skobkin/Bundle/PointToolsBundle/Resources/views/Telegram/settings.md.twig index ed59685..5eabd83 100644 --- a/src/Skobkin/Bundle/PointToolsBundle/Resources/views/Telegram/settings.md.twig +++ b/src/Skobkin/Bundle/PointToolsBundle/Resources/views/Telegram/settings.md.twig @@ -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. \ No newline at end of file diff --git a/src/Skobkin/Bundle/PointToolsBundle/Service/Telegram/PrivateMessageProcessor.php b/src/Skobkin/Bundle/PointToolsBundle/Service/Telegram/PrivateMessageProcessor.php index 34af9af..609fb39 100644 --- a/src/Skobkin/Bundle/PointToolsBundle/Service/Telegram/PrivateMessageProcessor.php +++ b/src/Skobkin/Bundle/PointToolsBundle/Service/Telegram/PrivateMessageProcessor.php @@ -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.'); }