From fda5250a52f8bedab8903869dba83ecc9ade8437 Mon Sep 17 00:00:00 2001 From: Manuel Cortez Date: Mon, 6 Feb 2023 02:38:18 -0600 Subject: [PATCH] Mastodon: Add admin.sign_up to supported notifications. --- src/sessions/mastodon/compose.py | 2 ++ src/sessions/mastodon/templates.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/sessions/mastodon/compose.py b/src/sessions/mastodon/compose.py index cc78c180..43164db8 100644 --- a/src/sessions/mastodon/compose.py +++ b/src/sessions/mastodon/compose.py @@ -73,6 +73,8 @@ def compose_notification(notification, db, relative_times, show_screen_names, sa text = _("{username} has added to favorites: {status}").format(username=user, status=",".join(compose_post(notification.status, db, relative_times, show_screen_names, safe=safe))) elif notification.type == "follow": text = _("{username} has followed you.").format(username=user) + elif notification.type == "admin.sign_up": + text = _("{username} has joined the instance.").format(username=user) elif notification.type == "poll": text = _("A poll in which you have voted has expired: {status}").format(status=",".join(compose_post(notification.status, db, relative_times, show_screen_names, safe=safe))) elif notification.type == "follow_request": diff --git a/src/sessions/mastodon/templates.py b/src/sessions/mastodon/templates.py index bda4214a..0d5bdea3 100644 --- a/src/sessions/mastodon/templates.py +++ b/src/sessions/mastodon/templates.py @@ -170,6 +170,8 @@ def render_notification(notification, template, post_template, relative_times=Fa text = _("has updated a status: {status}").format(status=render_post(notification.status, post_template, relative_times, offset_hours)) elif notification.type == "follow": text = _("has followed you.") + elif notification.type == "admin.sign_up": + text = _("has joined the instance.") elif notification.type == "poll": text = _("A poll in which you have voted has expired: {status}").format(status=render_post(notification.status, post_template, relative_times, offset_hours)) elif notification.type == "follow_request":