Browse Source

Fills the status update notification

Adrien Panay 7 years ago
parent
commit
b0cc0553f4
1 changed files with 12 additions and 0 deletions
  1. 12 0
      tracim/tracim/lib/notifications.py

+ 12 - 0
tracim/tracim/lib/notifications.py View File

@@ -375,6 +375,18 @@ class EmailNotifier(object):
375 375
                 content_text = '<p id="content-body-intro">{}</p>'.format(content.get_label()) + \
376 376
                     content.description
377 377
 
378
+        elif ActionDescription.STATUS_UPDATE == action:
379
+            call_to_action_text = l_('View online')
380
+            intro_user_msg = l_(
381
+                '<span id="content-intro-username">{}</span> '
382
+                'updated the following status:'
383
+            )
384
+            content_intro = intro_user_msg.format(actor.display_name)
385
+            intro_body_msg = '<p id="content-body-intro">{}: {}</p>'
386
+            content_text = intro_body_msg.format(
387
+                content.get_label(),
388
+                content.get_status().label,
389
+            )
378 390
 
379 391
         if '' == content_intro and content_text == '':
380 392
             # Skip notification, but it's not normal