outbox
This commit is contained in:
parent
9e58091a04
commit
2611e06daa
@ -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'])
|
||||
|
Loading…
Reference in New Issue
Block a user