Skip to content

Commit 10982ef

Browse files
committed
fix: exclude tool_request category from user notification preferences
tool_request notifications are admin-targeted; exposing the setting to regular users would let them opt out of receiving notifications they cannot receive anyway, and admins opting out would defeat the purpose.
1 parent f4db42d commit 10982ef

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

client/src/components/User/Notifications/NotificationsPreferences.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,9 @@ const pushNotificationsGranted = ref(pushNotificationsEnabled());
4040
const notificationsPreferences = ref<UserNotificationPreferences>({});
4141
const supportedChannels = ref<NotificationChannel[]>([]);
4242
43-
const categories = computed<NotificationCategory[]>(
44-
() => Object.keys(notificationsPreferences.value) as NotificationCategory[],
43+
// tool_request notifications are admin-targeted; users should not be able to opt out.
44+
const categories = computed<NotificationCategory[]>(() =>
45+
(Object.keys(notificationsPreferences.value) as NotificationCategory[]).filter((c) => c !== "tool_request"),
4546
);
4647
const showPreferences = computed(() => {
4748
return !loading.value && config.value.enable_notification_system && notificationsPreferences.value;

0 commit comments

Comments
 (0)