From: Matthijs Kooijman Date: Sun, 16 Nov 2008 16:48:40 +0000 (+0100) Subject: Don't notify the player of private comments. X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fprojects%2Fxerxes.git;a=commitdiff_plain;h=8b00931d1b7e192e02455a35b1e69ffe03d2e71a Don't notify the player of private comments. --- 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,