changeset 5126:02234c0ac784

include comment in email notifies
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 05 Sep 2009 22:12:27 +0200
parents b8d919e435d5
children 030379520983
files MoinMoin/events/emailnotify.py
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/events/emailnotify.py	Sat Sep 05 21:20:09 2009 +0200
+++ b/MoinMoin/events/emailnotify.py	Sat Sep 05 22:12:27 2009 +0200
@@ -51,7 +51,12 @@
             'username': page.uid_override or user.getUserIdentification(request),
         }
 
-    return {'subject': subject, 'text': change['text'] + pagelink + change['diff']}
+    if change.has_key('comment'):
+        comment = _("Comment:") + "\n" + change['comment'] + "\n\n"
+    else:
+        comment = ''
+
+    return {'subject': subject, 'text': change['text'] + pagelink + comment + change['diff']}
 
 
 def send_notification(request, from_address, emails, data):