Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revamp notification policy options #31343

Merged
merged 8 commits into from
Aug 9, 2024

Conversation

ClearlyClaire
Copy link
Contributor

@ClearlyClaire ClearlyClaire commented Aug 8, 2024

This PR is a prerequisite for #31342

It adds a new option to filter notifications from limited (aka “silenced”) accounts, and extends each option with the ability to drop notifications rather than filter them.

This deprecates /api/v1/notifications/policy (which was never released) and replaces it with:

GET /api/v2/notifications/policy
{
  "for_not_following": "accept",
  "for_not_followers": "accept",
  "for_new_accounts": "accept",
  "for_private_mentions": "filter",
  "for_limited_accounts": "filter",
  "summary": {
    "pending_requests_count": 1,
    "pending_notifications_count": 1
  }
}

TODO

  • add model and database support
  • adapt old API endpoint
  • apply new options in NotifyService
  • add data migration (pre-migration and post-migration)
  • add new API endpoint

@ClearlyClaire ClearlyClaire force-pushed the features/notifications-filtering-v2-backend branch from 4cd6181 to 981647d Compare August 8, 2024 13:14
@ClearlyClaire ClearlyClaire force-pushed the features/notifications-filtering-v2-backend branch from 981647d to 95ba36d Compare August 8, 2024 13:20
@ClearlyClaire ClearlyClaire changed the title [WiP] Revamp notification policy options Revamp notification policy options Aug 8, 2024
@ClearlyClaire ClearlyClaire added api REST API, Streaming API, Web Push API ruby Pull requests that update Ruby code labels Aug 8, 2024
@ClearlyClaire ClearlyClaire force-pushed the features/notifications-filtering-v2-backend branch from bee4010 to cb43908 Compare August 8, 2024 13:27
@ClearlyClaire ClearlyClaire marked this pull request as ready for review August 8, 2024 13:28
@ClearlyClaire ClearlyClaire force-pushed the features/notifications-filtering-v2-backend branch from cb43908 to 53e03a7 Compare August 8, 2024 13:30
@ClearlyClaire ClearlyClaire requested a review from a team August 8, 2024 13:53
app/services/notify_service.rb Outdated Show resolved Hide resolved
app/services/notify_service.rb Outdated Show resolved Hide resolved
@Gargron Gargron added this pull request to the merge queue Aug 9, 2024
Merged via the queue into main with commit cbdd8ed Aug 9, 2024
29 checks passed
@Gargron Gargron deleted the features/notifications-filtering-v2-backend branch August 9, 2024 13:41
justinwritescode pushed a commit to justinwritescode/mastodon that referenced this pull request Sep 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api REST API, Streaming API, Web Push API ruby Pull requests that update Ruby code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants