From a4c05c694fd88ded8b0a977d80b54ec7cd142add Mon Sep 17 00:00:00 2001 From: Claire Date: Tue, 5 Aug 2025 18:15:16 +0200 Subject: [PATCH] Fix quote notification filtering and add settings (#35690) --- .../mastodon/actions/notification_groups.ts | 4 +++- app/javascript/mastodon/actions/notifications.js | 2 +- .../notifications/components/column_settings.jsx | 11 +++++++++++ app/javascript/mastodon/locales/en.json | 1 + app/javascript/mastodon/reducers/settings.js | 3 +++ 5 files changed, 19 insertions(+), 2 deletions(-) diff --git a/app/javascript/mastodon/actions/notification_groups.ts b/app/javascript/mastodon/actions/notification_groups.ts index 43863254818..19d8750fa72 100644 --- a/app/javascript/mastodon/actions/notification_groups.ts +++ b/app/javascript/mastodon/actions/notification_groups.ts @@ -161,7 +161,9 @@ export const processNewNotificationForGroups = createAppAsyncThunk( if (!showInColumn) return; if ( - (notification.type === 'mention' || notification.type === 'update') && + (notification.type === 'mention' || + notification.type === 'update' || + notification.type === 'quote') && notification.status?.filtered ) { const filters = notification.status.filtered.filter((result) => diff --git a/app/javascript/mastodon/actions/notifications.js b/app/javascript/mastodon/actions/notifications.js index 2499b8da1d7..cbfddc750f3 100644 --- a/app/javascript/mastodon/actions/notifications.js +++ b/app/javascript/mastodon/actions/notifications.js @@ -31,7 +31,7 @@ export function updateNotifications(notification, intlMessages, intlLocale) { let filtered = false; - if (['mention', 'status'].includes(notification.type) && notification.status.filtered) { + if (['mention', 'status', 'quote'].includes(notification.type) && notification.status.filtered) { const filters = notification.status.filtered.filter(result => result.filter.context.includes('notifications')); if (filters.some(result => result.filter.filter_action === 'hide')) { diff --git a/app/javascript/mastodon/features/notifications/components/column_settings.jsx b/app/javascript/mastodon/features/notifications/components/column_settings.jsx index 9616adcb937..b1f4e598185 100644 --- a/app/javascript/mastodon/features/notifications/components/column_settings.jsx +++ b/app/javascript/mastodon/features/notifications/components/column_settings.jsx @@ -143,6 +143,17 @@ class ColumnSettings extends PureComponent { +
+

+ +
+ + {showPushSettings && } + + +
+
+

diff --git a/app/javascript/mastodon/locales/en.json b/app/javascript/mastodon/locales/en.json index c91516695b0..aa18fc39ce1 100644 --- a/app/javascript/mastodon/locales/en.json +++ b/app/javascript/mastodon/locales/en.json @@ -658,6 +658,7 @@ "notifications.column_settings.mention": "Mentions:", "notifications.column_settings.poll": "Poll results:", "notifications.column_settings.push": "Push notifications", + "notifications.column_settings.quote": "Quotes:", "notifications.column_settings.reblog": "Boosts:", "notifications.column_settings.show": "Show in column", "notifications.column_settings.sound": "Play sound", diff --git a/app/javascript/mastodon/reducers/settings.js b/app/javascript/mastodon/reducers/settings.js index 9e2ee5f55ab..cea8949f23c 100644 --- a/app/javascript/mastodon/reducers/settings.js +++ b/app/javascript/mastodon/reducers/settings.js @@ -36,6 +36,7 @@ const initialState = ImmutableMap({ follow_request: false, favourite: false, reblog: false, + quote: false, mention: false, poll: false, status: false, @@ -59,6 +60,7 @@ const initialState = ImmutableMap({ follow_request: false, favourite: true, reblog: true, + quote: true, mention: true, poll: true, status: true, @@ -72,6 +74,7 @@ const initialState = ImmutableMap({ follow_request: false, favourite: true, reblog: true, + quote: true, mention: true, poll: true, status: true,