mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-26 12:53:12 -06:00
Mastodon: Added status updates for subscribed entities to notifications
This commit is contained in:
parent
12b4c8ac23
commit
4b232d527c
@ -63,7 +63,9 @@ def compose_notification(notification, db, relative_times, show_screen_names, sa
|
|||||||
else:
|
else:
|
||||||
ts = original_date.shift(hours=db["utc_offset"]).format(_("dddd, MMMM D, YYYY H:m"), locale=languageHandler.curLang[:2])
|
ts = original_date.shift(hours=db["utc_offset"]).format(_("dddd, MMMM D, YYYY H:m"), locale=languageHandler.curLang[:2])
|
||||||
text = "Unknown: %r" % (notification)
|
text = "Unknown: %r" % (notification)
|
||||||
if notification.type == "mention":
|
if notification.type == "status":
|
||||||
|
text = _("{username} has posted: {status}").format(username=user, status=",".join(compose_post(notification.status, db, relative_times, show_screen_names, safe=safe)))
|
||||||
|
elif notification.type == "mention":
|
||||||
text = _("{username} has mentionned you: {status}").format(username=user, status=",".join(compose_post(notification.status, db, relative_times, show_screen_names, safe=safe)))
|
text = _("{username} has mentionned you: {status}").format(username=user, status=",".join(compose_post(notification.status, db, relative_times, show_screen_names, safe=safe)))
|
||||||
elif notification.type == "reblog":
|
elif notification.type == "reblog":
|
||||||
text = _("{username} has boosted: {status}").format(username=user, status=",".join(compose_post(notification.status, db, relative_times, show_screen_names, safe=safe)))
|
text = _("{username} has boosted: {status}").format(username=user, status=",".join(compose_post(notification.status, db, relative_times, show_screen_names, safe=safe)))
|
||||||
|
@ -158,7 +158,9 @@ def render_notification(notification, template, post_template, relative_times=Fa
|
|||||||
text = "Unknown: %r" % (notification)
|
text = "Unknown: %r" % (notification)
|
||||||
# Remove date from status, so it won't be rendered twice.
|
# Remove date from status, so it won't be rendered twice.
|
||||||
post_template = post_template.replace("$date", "")
|
post_template = post_template.replace("$date", "")
|
||||||
if notification.type == "mention":
|
if notification.type == "status":
|
||||||
|
text = _("has posted: {status}").format(status=render_post(notification.status, post_template, relative_times, offset_hours))
|
||||||
|
elif notification.type == "mention":
|
||||||
text = _("has mentionned you: {status}").format(status=render_post(notification.status, post_template, relative_times, offset_hours))
|
text = _("has mentionned you: {status}").format(status=render_post(notification.status, post_template, relative_times, offset_hours))
|
||||||
elif notification.type == "reblog":
|
elif notification.type == "reblog":
|
||||||
text = _("has boosted: {status}").format(status=render_post(notification.status, post_template, relative_times, offset_hours))
|
text = _("has boosted: {status}").format(status=render_post(notification.status, post_template, relative_times, offset_hours))
|
||||||
|
Loading…
Reference in New Issue
Block a user