From 285bb71b1c3a780db92da86078f450d43ba8725b Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Sun, 17 Jul 2011 21:19:24 +0100 Subject: [PATCH] Send reddit messages to all accounts linked to the app --- app/hr/views.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/hr/views.py b/app/hr/views.py index 7e11d7b..5771086 100644 --- a/app/hr/views.py +++ b/app/hr/views.py @@ -31,7 +31,9 @@ def send_message(application, message_type, note=None): if installed('reddit') and len(application.user.redditaccount_set.all()) > 0: from reddit.tasks import send_reddit_message - send_reddit_message.delay(to=application.user.redditaccount_set.all()[0].username, subject=subject, message=message) + + for account in application.user.redditaccount_set.all(): + send_reddit_message.delay(to=account.username, subject=subject, message=message) def check_permissions(user, application=None):