From: jordan Date: Tue, 15 Mar 2011 23:53:57 +0000 (+0000) Subject: merge notification-config -> trunk, previous revision 694, changes to the subscriptio... X-Git-Tag: live~420 X-Git-Url: https://git.openstreetmap.org/osqa.git/commitdiff_plain/6029e450161448236cedc6c8934a152075157c55 merge notification-config -> trunk, previous revision 694, changes to the subscription hooks git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@847 0cfe37f9-358a-4d5e-be75-b63607b5c754 --- diff --git a/forum/subscriptions.py b/forum/subscriptions.py index 462e284..e897e4e 100644 --- a/forum/subscriptions.py +++ b/forum/subscriptions.py @@ -38,9 +38,8 @@ def question_posted(action, new): send_template_email(subscribers, "notifications/newquestion.html", {'question': question}) - if question.author.subscription_settings.questions_asked: - subscription = QuestionSubscription(question=question, user=question.author) - subscription.save() + subscription = QuestionSubscription(question=question, user=question.author) + subscription.save() new_subscribers = User.objects.filter( Q(subscription_settings__all_questions=True) | @@ -68,8 +67,7 @@ def answer_posted(action, new): send_template_email(subscribers, "notifications/newanswer.html", {'answer': answer}) - if answer.author.subscription_settings.questions_answered: - create_subscription_if_not_exists(question, answer.author) + create_subscription_if_not_exists(question, answer.author) AnswerAction.hook(answer_posted) @@ -100,8 +98,7 @@ def comment_posted(action, new): send_template_email(subscribers, "notifications/newcomment.html", {'comment': comment}) - if comment.user.subscription_settings.questions_commented: - create_subscription_if_not_exists(question, comment.user) + create_subscription_if_not_exists(question, comment.user) CommentAction.hook(comment_posted)