aboutsummaryrefslogtreecommitdiff
path: root/src/services
diff options
context:
space:
mode:
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
-rw-r--r--src/services/sw/sw.js6
3 files changed, 9 insertions, 4 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',
diff --git a/src/services/sw/sw.js b/src/services/sw/sw.js
index 554cc7b8..b25f6328 100644
--- a/src/services/sw/sw.js
+++ b/src/services/sw/sw.js
@@ -36,9 +36,9 @@ function subscribePush (registration, isEnabled, vapidPublicKey) {
function unsubscribePush (registration) {
return registration.pushManager.getSubscription()
- .then((subscribtion) => {
- if (subscribtion === null) { return }
- return subscribtion.unsubscribe()
+ .then((subscription) => {
+ if (subscription === null) { return }
+ return subscription.unsubscribe()
})
}