aboutsummaryrefslogtreecommitdiff
path: root/src/services
diff options
context:
space:
mode:
authormarcin mikołajczak <git@mkljczk.pl>2024-05-25 08:42:32 +0200
committermarcin mikołajczak <git@mkljczk.pl>2024-05-25 08:42:32 +0200
commit5c48ea2f1abb21f88990c000e0f158dfa19fa4d7 (patch)
tree3a59d8ea1bc11a2f26c44e95a162475f45feddee /src/services
parent82db31f7ac32443b2a5d51ed3ce6d52cd9dcfac7 (diff)
Support `status` notification type
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
Diffstat (limited to 'src/services')
-rw-r--r--src/services/notification_utils/notification_utils.js6
-rw-r--r--src/services/notifications_fetcher/notifications_fetcher.service.js1
2 files changed, 6 insertions, 1 deletions
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',