Преглед на файлове

Merge pull request #304 from tracim/fix/108/empty_status_update_notification

Tracim преди 7 години
родител
ревизия
76b61826e3
променени са 1 файла, в които са добавени 12 реда и са изтрити 0 реда
  1. 12 0
      tracim/tracim/lib/notifications.py

+ 12 - 0
tracim/tracim/lib/notifications.py Целия файл

@@ -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