X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fprojects%2Fxerxes.git;a=blobdiff_plain;f=influences%2Fnotify.py;h=1b6fb478253eec2361aa2147acff32354bbe4bb7;hp=e5c763ae36b40dea3d20b39d324233b8aad15378;hb=8b00931d1b7e192e02455a35b1e69ffe03d2e71a;hpb=0386871f87ae12833fae51c83c4386ba0743a17b 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,