Merge branch 'remove/mastofe' into 'develop'
authorHaelwenn <contact+git.pleroma.social@hacktivis.me>
Tue, 7 Sep 2021 16:41:53 +0000 (16:41 +0000)
committerHaelwenn <contact+git.pleroma.social@hacktivis.me>
Tue, 7 Sep 2021 16:41:53 +0000 (16:41 +0000)
Remove MastoFE from Pleroma, fixes #2625

Closes #2625

See merge request pleroma/pleroma!3392

1  2 
CHANGELOG.md
config/config.exs
config/description.exs
docs/configuration/cheatsheet.md
test/pleroma/user_test.exs

diff --combined CHANGELOG.md
index 00335065850416d5ad5781cfb41a50ecdf454cc8,fe42b307e1bddaf6f55d9dab3c67a7fa41ff363f..4758acc577eb423435e48cd1800d033d57816432
@@@ -6,41 -6,13 +6,45 @@@ The format is based on [Keep a Changelo
  
  ## Unreleased
  
+ ### Removed
+ - MastoFE
  ### Changed
  
 +### Added
 +
 +### Fixed
 +- Subscription(Bell) Notifications: Don't create from Pipeline Ingested replies
 +
 +### Removed
 +
 +## 2.4.1 - 2021-08-29
 +
 +### Changed
 +- Make `mix pleroma.database set_text_search_config` run concurrently and indefinitely
 +
 +### Added
 +- AdminAPI: Missing configuration description for StealEmojiPolicy
 +
 +### Fixed
 +- MastodonAPI: Stream out Create activities
 +- MRF ObjectAgePolicy: Fix pattern matching on "published"
 +- TwitterAPI: Make `change_password` and `change_email` require params on body instead of query
 +- Subscription(Bell) Notifications: Don't create from Pipeline Ingested replies
 +- AdminAPI: Fix rendering reports containing a `nil` object
 +- Mastodon API: Activity Search fallbacks on status fetching after a DB Timeout/Error
 +- Mastodon API: Fix crash in Streamer related to reblogging
 +- AdminAPI: List available frontends when `static/frontends` folder is missing
 +- Make activity search properly use language-aware GIN indexes
 +- AdminAPI: Fix suggestions for MRF Policies
 +
 +## 2.4.0 - 2021-08-08
 +
 +### Changed
 +
  - **Breaking:** Configuration: `:chat, enabled` moved to `:shout, enabled` and `:instance, chat_limit` moved to `:shout, limit`
 +- **Breaking** Entries for simple_policy, transparency_exclusions and quarantined_instances now list both the instance and a reason.
  - Support for Erlang/OTP 24
  - The `application` metadata returned with statuses is no longer hardcoded. Apps that want to display these details will now have valid data for new posts after this change.
  - HTTPSecurityPlug now sends a response header to opt out of Google's FLoC (Federated Learning of Cohorts) targeted advertising.
@@@ -56,7 -28,6 +60,7 @@@
  - AdminAPI: return `created_at` date with users.
  - `AnalyzeMetadata` upload filter for extracting image/video attachment dimensions and generating blurhashes for images. Blurhashes for videos are not generated at this time.
  - Attachment dimensions and blurhashes are federated when available.
 +- Mastodon API: support `poll` notification.
  - Pinned posts federation
  
  ### Fixed
  - Mix task `pleroma.database prune_objects`
  - Fixed rendering of JSON errors on ActivityPub endpoints.
  - Linkify: Parsing crash with URLs ending in unbalanced closed paren, no path separator, and no query parameters
 -
 -### Removed
 -- **Breaking**: Remove deprecated `/api/qvitter/statuses/notifications/read` (replaced by `/api/v1/pleroma/notifications/read`)
 -
 -## Unreleased (Patch)
 -
 -### Fixed
 -
  - Try to save exported ConfigDB settings (migrate_from_db) in the system temp directory if default location is not writable.
  - Uploading custom instance thumbnail via AdminAPI/AdminFE generated invalid URL to the image
  - Applying ConcurrentLimiter settings via AdminAPI
  - MRF (`SimplePolicy`): Embedded objects are now checked. If any embedded object would be rejected, its parent is rejected. This fixes Announces leaking posts from blocked domains.
  - Fixed some Markdown issues, including trailing slash in links.
  
 -## [2.3.0] - 2020-03-01
 +### Removed
 +- **Breaking**: Remove deprecated `/api/qvitter/statuses/notifications/read` (replaced by `/api/v1/pleroma/notifications/read`)
 +
 +## [2.3.0] - 2021-03-01
  
  ### Security
  
    - Mastodon API: Support for expires_in/expires_at in the Filters.
  </details>
  
 -## [2.2.2] - 2020-01-18
 +## [2.2.2] - 2021-01-18
  
  ### Fixed
  
diff --combined config/config.exs
index 828fe00857518594c69495ae44f705c9debd8b71,51a6bdbd50a5dd70f3277e8751d3cc4cadcf953c..66d394655657869f8f8346fdb4a070eb506e5d6a
@@@ -321,9 -321,6 +321,6 @@@ config :pleroma, :frontend_configuratio
      subjectLineBehavior: "email",
      theme: "pleroma-dark",
      webPushNotifications: false
-   },
-   masto_fe: %{
-     showInstanceSpecificPanel: true
    }
  
  config :pleroma, :assets,
@@@ -560,7 -557,6 +557,7 @@@ config :pleroma, Oban
      mailer: 10,
      transmogrifier: 20,
      scheduled_activities: 10,
 +    poll_notifications: 10,
      background: 5,
      remote_fetcher: 2,
      attachments_cleanup: 1,
diff --combined config/description.exs
index c72231faa5ef479b117e413290d96fc9d16ef025,94907aaba35b71bcb994b6df995fb3d3a744ca77..7d1b29b230e1c4b52c6ea5bd1ded3966136dca1f
@@@ -687,14 -687,12 +687,14 @@@ config :pleroma, :config_description, 
        },
        %{
          key: :quarantined_instances,
 -        type: {:list, :string},
 +        type: {:list, :tuple},
 +        key_placeholder: "instance",
 +        value_placeholder: "reason",
          description:
 -          "List of ActivityPub instances where private (DMs, followers-only) activities will not be sent",
 +          "List of ActivityPub instances where private (DMs, followers-only) activities will not be sent and the reason for doing so",
          suggestions: [
 -          "quarantined.com",
 -          "*.quarantined.com"
 +          {"quarantined.com", "Reason"},
 +          {"*.quarantined.com", "Reason"}
          ]
        },
        %{
      type: :group,
      description:
        "This form can be used to configure a keyword list that keeps the configuration data for any " <>
-         "kind of frontend. By default, settings for pleroma_fe and masto_fe are configured. If you want to " <>
+         "kind of frontend. By default, settings for pleroma_fe are configured. If you want to " <>
          "add your own configuration your settings all fields must be complete.",
      children: [
        %{
              suggestions: ["pleroma-dark"]
            }
          ]
-       },
-       %{
-         key: :masto_fe,
-         label: "Masto FE",
-         type: :map,
-         description: "Settings for Masto FE",
-         suggestions: [
-           %{
-             showInstanceSpecificPanel: true
-           }
-         ],
-         children: [
-           %{
-             key: :showInstanceSpecificPanel,
-             label: "Show instance specific panel",
-             type: :boolean,
-             description: "Whenether to show the instance's specific panel"
-           }
-         ]
        }
      ]
    },
index d3c9c5716e7928d69fc905f897f65590a30b29b3,59061aaa66a8413c58786fe9debda8a8104eb865..251dc24e856312ae8ad2894262dcd0d30943ba79
@@@ -39,7 -39,7 +39,7 @@@ To add configuration to your config fil
  * `federation_reachability_timeout_days`: Timeout (in days) of each external federation target being unreachable prior to pausing federating to it.
  * `allow_relay`: Permits remote instances to subscribe to all public posts of your instance. This may increase the visibility of your instance.
  * `public`: Makes the client API in authenticated mode-only except for user-profiles. Useful for disabling the Local Timeline and The Whole Known Network. Note that there is a dependent setting restricting or allowing unauthenticated access to specific resources, see `restrict_unauthenticated` for more details.
 -* `quarantined_instances`: List of ActivityPub instances where private (DMs, followers-only) activities will not be send.
 +* `quarantined_instances`: ActivityPub instances where private (DMs, followers-only) activities will not be send.
  * `allowed_post_formats`: MIME-type list of formats allowed to be posted (transformed into HTML).
  * `extended_nickname_format`: Set to `true` to use extended local nicknames format (allows underscores/dashes). This will break federation with
      older software for theses nicknames.
      Configuring MRF policies is not enough for them to take effect. You have to enable them by specifying their module in `policies` under [:mrf](#mrf) section.
  
  #### :mrf_simple
 -* `media_removal`: List of instances to remove media from.
 -* `media_nsfw`: List of instances to put media as NSFW(sensitive) from.
 -* `federated_timeline_removal`: List of instances to remove from Federated (aka The Whole Known Network) Timeline.
 -* `reject`: List of instances to reject any activities from.
 -* `accept`: List of instances to accept any activities from.
 -* `followers_only`: List of instances to decrease post visibility to only the followers, including for DM mentions.
 -* `report_removal`: List of instances to reject reports from.
 -* `avatar_removal`: List of instances to strip avatars from.
 -* `banner_removal`: List of instances to strip banners from.
 +* `media_removal`: List of instances to strip media attachments from and the reason for doing so.
 +* `media_nsfw`: List of instances to tag all media as NSFW (sensitive) from and the reason for doing so.
 +* `federated_timeline_removal`: List of instances to remove from the Federated Timeline (aka The Whole Known Network) and the reason for doing so.
 +* `reject`: List of instances to reject activities (except deletes) from and the reason for doing so.
 +* `accept`: List of instances to only accept activities (except deletes) from and the reason for doing so.
 +* `followers_only`: Force posts from the given instances to be visible by followers only and the reason for doing so.
 +* `report_removal`: List of instances to reject reports from and the reason for doing so.
 +* `avatar_removal`: List of instances to strip avatars from and the reason for doing so.
 +* `banner_removal`: List of instances to strip banners from and the reason for doing so.
 +* `reject_deletes`: List of instances to reject deletions from and the reason for doing so.
  
  #### :mrf_subchain
  This policy processes messages through an alternate pipeline when a given message matches certain criteria.
@@@ -247,7 -246,7 +247,7 @@@ Notes
  
  ### :frontend_configurations
  
- This can be used to configure a keyword list that keeps the configuration data for any kind of frontend. By default, settings for `pleroma_fe` and `masto_fe` are configured. You can find the documentation for `pleroma_fe` configuration into [Pleroma-FE configuration and customization for instance administrators](/frontend/CONFIGURATION/#options).
+ This can be used to configure a keyword list that keeps the configuration data for any kind of frontend. By default, settings for `pleroma_fe` are configured. You can find the documentation for `pleroma_fe` configuration into [Pleroma-FE configuration and customization for instance administrators](/frontend/CONFIGURATION/#options).
  
  Frontends can access these settings at `/api/v1/pleroma/frontend_configurations`
  
@@@ -258,10 -257,7 +258,7 @@@ config :pleroma, :frontend_configuratio
    pleroma_fe: %{
      theme: "pleroma-dark",
      # ... see /priv/static/static/config.json for the available keys.
- },
-   masto_fe: %{
-     showInstanceSpecificPanel: true
-   }
+ }
  ```
  
  These settings **need to be complete**, they will override the defaults.
index c2ed2c2a3f2b4d47ed07713d72ddaed29beabf97,e0f7e91cdae6f66b1e77a778d1e85bca8245ebee..9922c8b56dfd5dded3953c33cb47eb9e14c0c273
@@@ -480,7 -480,7 +480,7 @@@ defmodule Pleroma.UserTest d
              )
  
      test "it sends a welcome chat message when Simple policy applied to local instance" do
 -      clear_config([:mrf_simple, :media_nsfw], ["localhost"])
 +      clear_config([:mrf_simple, :media_nsfw], [{"localhost", ""}])
  
        welcome_user = insert(:user)
        clear_config([:welcome, :chat_message, :enabled], true)
          ap_enabled: true,
          is_moderator: true,
          is_admin: true,
-         mastofe_settings: %{"a" => "b"},
          mascot: %{"a" => "b"},
          emoji: %{"a" => "b"},
          pleroma_settings_store: %{"q" => "x"},
               ap_enabled: false,
               is_moderator: false,
               is_admin: false,
-              mastofe_settings: nil,
               mascot: nil,
               emoji: %{},
               pleroma_settings_store: %{},