Send influence notifications to all players involved.
authorMatthijs Kooijman <matthijs@stdin.nl>
Sat, 31 Jan 2009 10:20:21 +0000 (11:20 +0100)
committerMatthijs Kooijman <matthijs@stdin.nl>
Sat, 31 Jan 2009 10:20:21 +0000 (11:20 +0100)
influences/notify.py
templates/influences/email/influence_changed.html
templates/influences/email/influence_comment_added.html

index 1b6fb478253eec2361aa2147acff32354bbe4bb7..2e719de41c6f83b539d5a9daa4f4c5c78f0685f9 100644 (file)
@@ -19,7 +19,7 @@ def influence_saved(**kwargs):
     created  = kwargs['created']
     if (not settings.DEBUG):
         # TODO: Perhaps only notify when the status is / becomes Done?
     created  = kwargs['created']
     if (not settings.DEBUG):
         # TODO: Perhaps only notify when the status is / becomes Done?
-        notify([instance.character.player, 'lextalionis@evolution-events.nl'], 'influences/email/influence_changed.html', {'influence' : instance, 'created' : created})
+        notify([instance.related_players.keys(), 'lextalionis@evolution-events.nl'], 'influences/email/influence_changed.html', {'influence' : instance, 'created' : created})
 
 def comment_saved(**kwargs):
     if (settings.DEBUG):
 
 def comment_saved(**kwargs):
     if (settings.DEBUG):
@@ -35,7 +35,7 @@ def comment_saved(**kwargs):
     if isinstance(object, Influence):
         recipients = ['lextalionis@evolution-events.nl']
         if comment.is_public:
     if isinstance(object, Influence):
         recipients = ['lextalionis@evolution-events.nl']
         if comment.is_public:
-            recipients.append(object.character.player)
+            recipients.extend(object.related_players.keys())
 
         notify(
             recipients,
 
         notify(
             recipients,
index ee08310c79718fce18ed9eca42ac29a947f64798..f4c8af8671b797169bbad5bb08055d269fc0ec59 100644 (file)
@@ -17,7 +17,7 @@ Subject: {% blocktrans %}Influence "{{ influence }}" was changed.{% endblocktran
 \\
 {% filter wordwrap:72 %}
 {% blocktrans with influence.created|date:"j F Y" as creation_date %}
 \\
 {% filter wordwrap:72 %}
 {% blocktrans with influence.created|date:"j F Y" as creation_date %}
-You have submitted an influence on {{ creation_date }}.
+You are involved in this influence, submitted on {{ creation_date }}.
 {% endblocktrans %}
 {% if not created %}
 {% blocktrans %}The influence has been modified. The current status is{%endblocktrans %}:{% else %}{% blocktrans %}You submitted{% endblocktrans%}:
 {% endblocktrans %}
 {% if not created %}
 {% blocktrans %}The influence has been modified. The current status is{%endblocktrans %}:{% else %}{% blocktrans %}You submitted{% endblocktrans%}:
index 60b62d26e2695e523e1f62107dc3bf6d300079c0..656f16346caf48434cf98f1da908f96ccf7b3a6c 100644 (file)
@@ -13,7 +13,7 @@ Subject: {% blocktrans %}Comment added to influence "{{ influence }}".{% endbloc
 \\
 {% filter wordwrap:72 %}
 {% blocktrans %}
 \\
 {% filter wordwrap:72 %}
 {% blocktrans %}
-{{commenter}} has just commented the following on your influence:
+{{commenter}} has just commented the following on an influence you are involved in:
 {% endblocktrans %}
 \\
 {{comment.comment}}
 {% endblocktrans %}
 \\
 {{comment.comment}}