summaryrefslogtreecommitdiff
path: root/packages/client/src/components/notifications.vue
diff options
context:
space:
mode:
Diffstat (limited to 'packages/client/src/components/notifications.vue')
-rw-r--r--packages/client/src/components/notifications.vue7
1 files changed, 3 insertions, 4 deletions
diff --git a/packages/client/src/components/notifications.vue b/packages/client/src/components/notifications.vue
index 5a77b5487e..c3753076ac 100644
--- a/packages/client/src/components/notifications.vue
+++ b/packages/client/src/components/notifications.vue
@@ -35,19 +35,18 @@ const props = defineProps<{
const pagingComponent = ref<InstanceType<typeof MkPagination>>();
-const allIncludeTypes = computed(() => props.includeTypes ?? notificationTypes.filter(x => !$i.mutingNotificationTypes.includes(x)));
-
const pagination: Paging = {
endpoint: 'i/notifications' as const,
limit: 10,
params: computed(() => ({
- includeTypes: allIncludeTypes.value || undefined,
+ includeTypes: props.includeTypes ?? undefined,
+ excludeTypes: props.includeTypes ? undefined : $i.mutingNotificationTypes,
unreadOnly: props.unreadOnly,
})),
};
const onNotification = (notification) => {
- const isMuted = !allIncludeTypes.value.includes(notification.type);
+ const isMuted = props.includeTypes ? !props.includeTypes.includes(notification.type) : $i.mutingNotificationTypes.includes(notification.type);
if (isMuted || document.visibilityState === 'visible') {
stream.send('readNotification', {
id: notification.id