From 5c48ea2f1abb21f88990c000e0f158dfa19fa4d7 Mon Sep 17 00:00:00 2001 From: marcin mikołajczak Date: Sat, 25 May 2024 08:42:32 +0200 Subject: Support `status` notification type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- src/services/notification_utils/notification_utils.js | 6 +++++- src/services/notifications_fetcher/notifications_fetcher.service.js | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'src/services') diff --git a/src/services/notification_utils/notification_utils.js b/src/services/notification_utils/notification_utils.js index 7b705e65..831b27f6 100644 --- a/src/services/notification_utils/notification_utils.js +++ b/src/services/notification_utils/notification_utils.js @@ -18,6 +18,7 @@ export const visibleTypes = store => { return ([ notificationVisibility.likes && 'like', notificationVisibility.mentions && 'mention', + notificationVisibility.statuses && 'status', notificationVisibility.repeats && 'repeat', notificationVisibility.follows && 'follow', notificationVisibility.followRequest && 'follow_request', @@ -28,7 +29,7 @@ export const visibleTypes = store => { ].filter(_ => _)) } -const statusNotifications = new Set(['like', 'mention', 'repeat', 'pleroma:emoji_reaction', 'poll']) +const statusNotifications = new Set(['like', 'mention', 'status', 'repeat', 'pleroma:emoji_reaction', 'poll']) export const isStatusNotification = (type) => statusNotifications.has(type) @@ -118,6 +119,9 @@ export const prepareNotificationObject = (notification, i18n) => { case 'like': i18nString = 'favorited_you' break + case 'status': + i18nString = 'subscribed_status' + break case 'repeat': i18nString = 'repeated_you' break diff --git a/src/services/notifications_fetcher/notifications_fetcher.service.js b/src/services/notifications_fetcher/notifications_fetcher.service.js index 6403693c..32854fed 100644 --- a/src/services/notifications_fetcher/notifications_fetcher.service.js +++ b/src/services/notifications_fetcher/notifications_fetcher.service.js @@ -5,6 +5,7 @@ import { promiseInterval } from '../promise_interval/promise_interval.js' // Note: chat_mention excluded as pleroma-fe polls them separately const mastoApiNotificationTypes = [ 'mention', + 'status', 'favourite', 'reblog', 'follow', -- cgit v1.2.3-70-g09d2