diff --git a/daemons/management/commands/notification_manager.py b/daemons/management/commands/notification_manager.py index f151f60..b5fee42 100644 --- a/daemons/management/commands/notification_manager.py +++ b/daemons/management/commands/notification_manager.py @@ -12,6 +12,8 @@ class Command(MessagingSupport): queue_name = "notification" def send_email(self, payload): + """С email потом разберемся""" + return subject = payload['subject'] message = payload['message'] email = payload['email'] @@ -54,8 +56,8 @@ class Command(MessagingSupport): message = f"Пользователь {from_user.username} хочет добавить тебя в друзья" if user.userinfo.notification_telegram: yield "telegram", {"chat_id": user.userinfo.telegram_chat_id, "text": message} - # if user.userinfo.notification_email: - # yield "email", {"subject": "Новая заявка в друзья", "message": message, "email": user.email} + if user.userinfo.notification_email: + yield "email", {"subject": "Новая заявка в друзья", "message": message, "email": user.email} def handle_friends_accept(self, payload): user = User.objects.get(id=payload['to_user'])