]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/subscriptions.py
Reintegrate merge cacheimp -> trunk.
[osqa.git] / forum / subscriptions.py
index 462e284c66a04878e6f218b2b0a24963fd333572..e897e4eebb486e917a75c776b004156a661bf1a8 100644 (file)
@@ -38,9 +38,8 @@ def question_posted(action, new):
 \r
     send_template_email(subscribers, "notifications/newquestion.html", {'question': question})\r
 \r
-    if question.author.subscription_settings.questions_asked:\r
-        subscription = QuestionSubscription(question=question, user=question.author)\r
-        subscription.save()\r
+    subscription = QuestionSubscription(question=question, user=question.author)\r
+    subscription.save()\r
 \r
     new_subscribers = User.objects.filter(\r
             Q(subscription_settings__all_questions=True) |\r
@@ -68,8 +67,7 @@ def answer_posted(action, new):
 \r
     send_template_email(subscribers, "notifications/newanswer.html", {'answer': answer})\r
 \r
-    if answer.author.subscription_settings.questions_answered:\r
-        create_subscription_if_not_exists(question, answer.author)\r
+    create_subscription_if_not_exists(question, answer.author)\r
 \r
 AnswerAction.hook(answer_posted)\r
 \r
@@ -100,8 +98,7 @@ def comment_posted(action, new):
 \r
     send_template_email(subscribers, "notifications/newcomment.html", {'comment': comment})\r
 \r
-    if comment.user.subscription_settings.questions_commented:\r
-        create_subscription_if_not_exists(question, comment.user)\r
+    create_subscription_if_not_exists(question, comment.user)\r
 \r
 CommentAction.hook(comment_posted)\r
 \r