Add policy to filter notifications from bots (#38494) (#38809)

This commit is contained in:
Evan Prodromou authored and GitHub committed 2026-06-09 12:28:53 +00:00
1 parent 4fcb28e081
commit 9c493c20b9
16 files changed
+229 -4

No files matched your search

@@ -88,6 +88,13 @@ export const PolicyControls: React.FC = () => {
[dispatch],
);
const handleFilterBots = useCallback(
(value: string) => {
changeFilter(dispatch, 'for_bots', value);
},
[dispatch],
);
if (!notificationPolicy) return null;
const options = [
@@ -209,6 +216,24 @@ export const PolicyControls: React.FC = () => {
/>
}
/>
<SelectWithLabel
value={notificationPolicy.for_bots}
onChange={handleFilterBots}
options={options}
label={
<FormattedMessage
id='notifications.policy.filter_bots_title'
defaultMessage='Bots'
/>
}
hint={
<FormattedMessage
id='notifications.policy.filter_bots_hint'
defaultMessage='Accounts marked as automated'
/>
}
/>
</div>
</section>
);
@@ -48,6 +48,9 @@ export const IgnoreNotificationsModal = ({ filterType }) => {
case 'for_limited_accounts':
title = <FormattedMessage id='ignore_notifications_modal.limited_accounts_title' defaultMessage='Ignore notifications from moderated accounts?' />;
break;
case 'for_bots':
title = <FormattedMessage id='ignore_notifications_modal.bots_title' defaultMessage='Ignore notifications from bots?' />;
break;
}
return (