2
0

Fix quote notification filtering and add settings (#35690)

This commit is contained in:
Claire
2025-08-05 18:15:16 +02:00
committed by GitHub
parent a968849e9c
commit a4c05c694f
5 changed files with 19 additions and 2 deletions

View File

@@ -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) =>

View File

@@ -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')) {

View File

@@ -143,6 +143,17 @@ class ColumnSettings extends PureComponent {
</div>
</section>
<section role='group' aria-labelledby='notifications-quote'>
<h3 id='notifications-quote'><FormattedMessage id='notifications.column_settings.quote' defaultMessage='Quotes:' /></h3>
<div className='column-settings__row'>
<SettingToggle disabled={browserPermission === 'denied'} prefix='notifications_desktop' settings={settings} settingPath={['alerts', 'quote']} onChange={onChange} label={alertStr} />
{showPushSettings && <SettingToggle prefix='notifications_push' settings={pushSettings} settingPath={['alerts', 'quote']} onChange={this.onPushChange} label={pushStr} />}
<SettingToggle prefix='notifications' settings={settings} settingPath={['shows', 'quote']} onChange={onChange} label={showStr} />
<SettingToggle prefix='notifications' settings={settings} settingPath={['sounds', 'quote']} onChange={onChange} label={soundStr} />
</div>
</section>
<section role='group' aria-labelledby='notifications-poll'>
<h3 id='notifications-poll'><FormattedMessage id='notifications.column_settings.poll' defaultMessage='Poll results:' /></h3>

View File

@@ -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",

View File

@@ -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,