Merge branch 'develop' into global-status-expiration
authorEgor Kislitsyn <egor@kislitsyn.com>
Mon, 16 Mar 2020 11:31:31 +0000 (15:31 +0400)
committerEgor Kislitsyn <egor@kislitsyn.com>
Mon, 16 Mar 2020 11:31:31 +0000 (15:31 +0400)
1  2 
CHANGELOG.md
config/config.exs
config/description.exs
docs/configuration/cheatsheet.md

diff --combined CHANGELOG.md
index 31156312ced8cdf21c2231b8abe31adb61397c73,4168086e269bb4fee745ee0e26c0bc56eb638cba..77cd35990b5bbd4cb6fc3a4fc139e4323ee682b0
@@@ -3,13 -3,10 +3,11 @@@ All notable changes to this project wil
  
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
  
- ## [Unreleased]
+ ## [unreleased]
  ### Changed
+ - **Breaking:** BBCode and Markdown formatters will no longer return any `\n` and only use `<br/>` for newlines
 +- MFR policy to set global expiration for all local Create activities
  
  ## [2.0.0] - 2019-03-08
  ### Security
  - Mastodon API: Fix being able to request enourmous amount of statuses in timelines leading to DoS. Now limited to 40 per request.
diff --combined config/config.exs
index 0c8e5e1c524a3b0a2e34b55b41d9191134a84288,3357e23e724b5804f629cb921b69d73e6bf18dda..c976691fbfb7a5d5f849565fe03e0eb033e6035b
@@@ -365,8 -365,6 +365,8 @@@ config :pleroma, :mrf_keyword
  
  config :pleroma, :mrf_subchain, match_actor: %{}
  
 +config :pleroma, :mrf_activity_expiration, days: 365
 +
  config :pleroma, :mrf_vocabulary,
    accept: [],
    reject: []
@@@ -506,10 -504,6 +506,6 @@@ config :pleroma, :workers
      federator_outgoing: 5
    ]
  
- config :pleroma, :fetch_initial_posts,
-   enabled: false,
-   pages: 5
  config :auto_linker,
    opts: [
      extra: true,
diff --combined config/description.exs
index f113931bd3722eee7aae98afd16efac7fd486c78,732c767344387445d03304b19893bd15ec47a859..373995ed65cec1c8d27da5e248f85c8fa4aedbd7
@@@ -1346,21 -1346,6 +1346,21 @@@ config :pleroma, :config_description, 
        }
      ]
    },
 +  %{
 +    group: :pleroma,
 +    key: :mrf_activity_expiration,
 +    label: "MRF Activity Expiration Policy",
 +    type: :group,
 +    description: "Adds expiration to all local Create activities",
 +    children: [
 +      %{
 +        key: :days,
 +        type: :integer,
 +        description: "Default global expiration time for all local Create activities (in days)",
 +        suggestions: [90, 365]
 +      }
 +    ]
 +  },
    %{
      group: :pleroma,
      key: :mrf_subchain,
        }
      ]
    },
-   %{
-     group: :pleroma_job_queue,
-     key: :queues,
-     type: :group,
-     description: "[Deprecated] Replaced with `Oban`/`:queues` (keeping the same format)"
-   },
-   %{
-     group: :pleroma,
-     key: Pleroma.Web.Federator.RetryQueue,
-     type: :group,
-     description: "[Deprecated] See `Oban` and `:workers` sections for configuration notes",
-     children: [
-       %{
-         key: :max_retries,
-         type: :integer,
-         description: "[Deprecated] Replaced as `Oban`/`:queues`/`:outgoing_federation` value"
-       }
-     ]
-   },
    %{
      group: :pleroma,
      key: Oban,
        }
      ]
    },
-   %{
-     group: :pleroma,
-     key: :fetch_initial_posts,
-     type: :group,
-     description: "Fetching initial posts settings",
-     children: [
-       %{
-         key: :enabled,
-         type: :boolean,
-         description: "Fetch posts when a new user is federated with"
-       },
-       %{
-         key: :pages,
-         type: :integer,
-         description: "The amount of pages to fetch",
-         suggestions: [5]
-       }
-     ]
-   },
    %{
      group: :auto_linker,
      key: :opts,
        }
      ]
    },
-   %{
-     group: :tesla,
-     type: :group,
-     description: "Tesla settings",
-     children: [
-       %{
-         key: :adapter,
-         type: :module,
-         description: "Tesla adapter",
-         suggestions: [Tesla.Adapter.Hackney]
-       }
-     ]
-   },
    %{
      group: :pleroma,
      key: :chat,
index 3fd372b950b5cae60cfc46c0851d80409b517ee1,2629385da2813324b7d809d0abc3a79941da6cb3..2974312c45de68c68265595d162f776a422ca4f9
@@@ -35,7 -35,7 +35,7 @@@ To add configuration to your config fil
  * `rewrite_policy`: Message Rewrite Policy, either one or a list. Here are the ones available by default:
      * `Pleroma.Web.ActivityPub.MRF.NoOpPolicy`: Doesn’t modify activities (default).
      * `Pleroma.Web.ActivityPub.MRF.DropPolicy`: Drops all activities. It generally doesn’t makes sense to use in production.
 -    * `Pleroma.Web.ActivityPub.MRF.SimplePolicy`: Restrict the visibility of activities from certains instances (See [`:mrf_simple`](#mrf_simple)).
 +    * `Pleroma.Web.ActivityPub.MRF.SimplePolicy`: Restrict the visibility of activities from certain instances (See [`:mrf_simple`](#mrf_simple)).
      * `Pleroma.Web.ActivityPub.MRF.TagPolicy`: Applies policies to individual users based on tags, which can be set using pleroma-fe/admin-fe/any other app that supports Pleroma Admin API. For example it allows marking posts from individual users nsfw (sensitive).
      * `Pleroma.Web.ActivityPub.MRF.SubchainPolicy`: Selectively runs other MRF policies when messages match (See [`:mrf_subchain`](#mrf_subchain)).
      * `Pleroma.Web.ActivityPub.MRF.RejectNonPublic`: Drops posts with non-public visibility settings (See [`:mrf_rejectnonpublic`](#mrf_rejectnonpublic)).
@@@ -45,8 -45,7 +45,8 @@@
      * `Pleroma.Web.ActivityPub.MRF.MentionPolicy`: Drops posts mentioning configurable users. (See [`:mrf_mention`](#mrf_mention)).
      * `Pleroma.Web.ActivityPub.MRF.VocabularyPolicy`: Restricts activities to a configured set of vocabulary. (See [`:mrf_vocabulary`](#mrf_vocabulary)).
      * `Pleroma.Web.ActivityPub.MRF.ObjectAgePolicy`: Rejects or delists posts based on their age when received. (See [`:mrf_object_age`](#mrf_object_age)).
 -* `public`: Makes the client API in authentificated mode-only except for user-profiles. Useful for disabling the Local Timeline and The Whole Known Network.
 +    * `Pleroma.Web.ActivityPub.MRF.ActivityExpirationPolicy`: Adds expiration to all local Create activities (see [`:mrf_activity_expiration`](#mrf_activity_expiration)).
 +* `public`: Makes the client API in authenticated 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 [:frontend_configurations](#frontend_configurations) or in ``static/config.json``.
  * `allowed_post_formats`: MIME-type list of formats allowed to be posted (transformed into HTML).
@@@ -145,10 -144,6 +145,10 @@@ config :pleroma, :mrf_user_allowlist
    * `:strip_followers` removes followers from the ActivityPub recipient list, ensuring they won't be delivered to home timelines
    * `:reject` rejects the message entirely
  
 +#### :mrf_activity_expiration
 +
 +* `days`: Default global expiration time for all local Create activities (in days)
 +
  ### :activitypub
  * `unfollow_blocked`: Whether blocks result in people getting unfollowed
  * `outgoing_blocks`: Whether to federate blocks to other instances
  * `sign_object_fetches`: Sign object fetches with HTTP signatures
  * `authorized_fetch_mode`: Require HTTP signatures for AP fetches
  
- ### :fetch_initial_posts
- !!! warning
-     Be careful with this setting, fetching posts may lead to new users being discovered whose posts will then also be fetched. This can lead to serious load on your instance and database.
- * `enabled`: If enabled, when a new user is discovered by your instance, fetch some of their latest posts.
- * `pages`: The amount of pages to fetch
  ## Pleroma.ScheduledActivity
  
  * `daily_user_limit`: the number of scheduled activities a user is allowed to create in a single day (Default: `25`)