Merge branch 'feature/mention-mrf' into 'develop'
authorkaniini <ariadne@dereferenced.org>
Wed, 17 Jul 2019 15:28:41 +0000 (15:28 +0000)
committerkaniini <ariadne@dereferenced.org>
Wed, 17 Jul 2019 15:28:41 +0000 (15:28 +0000)
Add MRF MentionPolicy for dropping posts which mention specific actors

See merge request pleroma/pleroma!1439

1  2 
CHANGELOG.md
docs/config.md

diff --combined CHANGELOG.md
index c5632f273987fc9c1deb23dfc6496ce2f223786e,0bc72a3fceb721020d7fc7d221039491dbfba9aa..0d91ad817874cfdef0e2aa5fe36fb760308936b7
@@@ -24,6 -24,7 +24,7 @@@ The format is based on [Keep a Changelo
  ### Added
  - MRF: Support for priming the mediaproxy cache (`Pleroma.Web.ActivityPub.MRF.MediaProxyWarmingPolicy`)
  - MRF: Support for excluding specific domains from Transparency.
+ - MRF: Support for filtering posts based on who they mention (`Pleroma.Web.ActivityPub.MRF.MentionPolicy`)
  - Configuration: `federation_incoming_replies_max_depth` option
  - Mastodon API: Support for the [`tagged` filter](https://github.com/tootsuite/mastodon/pull/9755) in [`GET /api/v1/accounts/:id/statuses`](https://docs.joinmastodon.org/api/rest/accounts/#get-api-v1-accounts-id-statuses)
  - Mastodon API, streaming: Add support for passing the token in the `Sec-WebSocket-Protocol` header
@@@ -32,7 -33,6 +33,7 @@@
  - Mastodon API: Add support for muting/unmuting notifications
  - Mastodon API: Add support for the `blocked_by` attribute in the relationship API (`GET /api/v1/accounts/relationships`). <https://github.com/tootsuite/mastodon/pull/10373>
  - Mastodon API: Add `pleroma.deactivated` to the Account entity
 +- Mastodon API: added `/auth/password` endpoint for password reset with rate limit.
  - Admin API: Return users' tags when querying reports
  - Admin API: Return avatar and display name when querying users
  - Admin API: Allow querying user by ID
@@@ -41,7 -41,6 +42,7 @@@
  - Configuration: `enabled` option for `Pleroma.Emails.Mailer`, defaulting to `false`.
  - Configuration: Pleroma.Plugs.RateLimiter `bucket_name`, `params` options.
  - Addressable lists
 +- Twitter API: added rate limit for `/api/account/password_reset` endpoint.
  
  ### Changed
  - Configuration: Filter.AnonymizeFilename added ability to retain file extension with custom text
diff --combined docs/config.md
index 346b8cda2b8c721ce562aa3408f6b97eec4757e6,5f69f8daf2b1d613f2a3c726d700217244d12886..42556a0be2e73315b4c3b84f42c9f0d28f0b6156
@@@ -101,6 -101,7 +101,7 @@@ config :pleroma, Pleroma.Emails.Mailer
    * `Pleroma.Web.ActivityPub.MRF.EnsureRePrepended`: Rewrites posts to ensure that replies to posts with subjects do not have an identical subject and instead begin with re:.
    * `Pleroma.Web.ActivityPub.MRF.AntiLinkSpamPolicy`: Rejects posts from likely spambots by rejecting posts from new users that contain links.
    * `Pleroma.Web.ActivityPub.MRF.MediaProxyWarmingPolicy`: Crawls attachments using their MediaProxy URLs so that the MediaProxy cache is primed.
+   * `Pleroma.Web.ActivityPub.MRF.MentionPolicy`: Drops posts mentioning configurable users. (see `:mrf_mention` section)
  * `public`: Makes the client API in authentificated mode-only except for user-profiles. Useful for disabling the Local Timeline and The Whole Known Network.
  * `quarantined_instances`: List of ActivityPub instances where private(DMs, followers-only) activities will not be send.
  * `managed_config`: Whenether the config for pleroma-fe is configured in this config or in ``static/config.json``
@@@ -271,6 -272,9 +272,9 @@@ config :pleroma, :mrf_subchain
  * `federated_timeline_removal`: A list of patterns which result in message being removed from federated timelines (a.k.a unlisted), each pattern can be a string or a [regular expression](https://hexdocs.pm/elixir/Regex.html)
  * `replace`: A list of tuples containing `{pattern, replacement}`, `pattern` can be a string or a [regular expression](https://hexdocs.pm/elixir/Regex.html)
  
+ ## :mrf_mention
+ * `actors`: A list of actors, for which to drop any posts mentioning.
  ## :media_proxy
  * `enabled`: Enables proxying of remote media to the instance’s proxy
  * `base_url`: The base URL to access a user-uploaded file. Useful when you want to proxy the media files via another host/CDN fronts.
@@@ -647,7 -651,5 +651,7 @@@ Supported rate limiters
  
  * `:search` for the search requests (account & status search etc.)
  * `:app_account_creation` for registering user accounts from the same IP address
 +* `:relations_actions` for actions on relations with all users (follow, unfollow)
 +* `:relation_id_action` for actions on relation with a specific user (follow, unfollow)
  * `:statuses_actions` for create / delete / fav / unfav / reblog / unreblog actions on any statuses
  * `:status_id_action` for fav / unfav or reblog / unreblog actions on the same status by the same user