Don't send notification when someone responds to his/her own comment
This commit is contained in:
parent
22a36bdb7c
commit
36d4ceb2d9
@ -145,7 +145,7 @@ class SMTP(object):
|
|||||||
for comment_to_notify in comments_to_notify:
|
for comment_to_notify in comments_to_notify:
|
||||||
email = comment_to_notify["email"]
|
email = comment_to_notify["email"]
|
||||||
if "email" in comment_to_notify and comment_to_notify["notification"] and email not in notified \
|
if "email" in comment_to_notify and comment_to_notify["notification"] and email not in notified \
|
||||||
and comment_to_notify["id"] != comment["id"]:
|
and comment_to_notify["id"] != comment["id"] and email != comment["email"]:
|
||||||
body = self.format(thread, comment, comment_to_notify, admin=False)
|
body = self.format(thread, comment, comment_to_notify, admin=False)
|
||||||
subject = "Re: New comment posted on %s" % thread["title"]
|
subject = "Re: New comment posted on %s" % thread["title"]
|
||||||
self.sendmail(subject, body, thread, comment, to=email)
|
self.sendmail(subject, body, thread, comment, to=email)
|
||||||
|
Loading…
Reference in New Issue
Block a user