From 8b00931d1b7e192e02455a35b1e69ffe03d2e71a Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Sun, 16 Nov 2008 17:48:40 +0100 Subject: [PATCH] Don't notify the player of private comments. --- influences/notify.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/influences/notify.py b/influences/notify.py index e5c763a..1b6fb47 100644 --- a/influences/notify.py +++ b/influences/notify.py @@ -26,14 +26,19 @@ def comment_saved(**kwargs): return comment = kwargs['instance'] + # We don't support comment editing, but let's check this anyway if not kwargs['created']: return object = comment.content_object if isinstance(object, Influence): + recipients = ['lextalionis@evolution-events.nl'] + if comment.is_public: + recipients.append(object.character.player) + notify( - [object.character.player, 'matthijs@stdin.nl'], + recipients, 'influences/email/influence_comment_added.html', {'comment' : comment, 'influence' : object, -- 2.30.2