From: Alex Gleason Date: Wed, 30 Dec 2020 23:10:02 +0000 (-0600) Subject: Merge remote-tracking branch 'upstream/develop' into aliases X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=cbce88007672dc810cb345bb9872a009cbdc93d8;p=akkoma Merge remote-tracking branch 'upstream/develop' into aliases --- cbce88007672dc810cb345bb9872a009cbdc93d8 diff --cc CHANGELOG.md index 1318b745f,e1604ab3a..b35fc159e --- a/CHANGELOG.md +++ b/CHANGELOG.md @@@ -5,12 -6,89 +6,90 @@@ The format is based on [Keep a Changelo ## Unreleased + ### Changed + + - Polls now always return a `voters_count`, even if they are single-choice. + - Admin Emails: The ap id is used as the user link in emails now. + - Improved registration workflow for email confirmation and account approval modes. + - **Breaking:** Changed `mix pleroma.user toggle_confirmed` to `mix pleroma.user confirm` + - Search: When using Postgres 11+, Pleroma will use the `websearch_to_tsvector` function to parse search queries. + - Emoji: Support the full Unicode 13.1 set of Emoji for reactions, plus regional indicators. + ### Added - - Mix tasks for controlling user account confirmation status in bulk (`mix pleroma.user confirm_all` and `mix pleroma.user unconfirm_all`) - - Mix task for sending confirmation emails to all unconfirmed users (`mix pleroma.email send_confirmation_mails`) - - Mix task option for force-unfollowing relays + + - Reports now generate notifications for admins and mods. + - Experimental websocket-based federation between Pleroma instances. + - Support for local-only statuses. + - Support pagination of blocks and mutes. + - Account backup. + - Configuration: Add `:instance, autofollowing_nicknames` setting to provide a way to make accounts automatically follow new users that register on the local Pleroma instance. + - Ability to view remote timelines, with ex. `/api/v1/timelines/public?instance=lain.com` and streams `public:remote` and `public:remote:media`. + - The site title is now injected as a `title` tag like preloads or metadata. + - Password reset tokens now are not accepted after a certain age. + - Mix tasks to help with displaying and removing ConfigDB entries. See `mix pleroma.config`. + - OAuth form improvements: users are remembered by their cookie, the CSS is overridable by the admin, and the style has been improved. + - OAuth improvements and fixes: more secure session-based authentication (by token that could be revoked anytime), ability to revoke belonging OAuth token from any client etc. +- Ability to set ActivityPub aliases for follower migration. +
+ API Changes + - Admin API: (`GET /api/pleroma/admin/users`) filter users by `unconfirmed` status and `actor_type`. + - Pleroma API: Add `idempotency_key` to the chat message entity that can be used for optimistic message sending. + - Pleroma API: (`GET /api/v1/pleroma/federation_status`) Add a way to get a list of unreachable instances. + - Mastodon API: User and conversation mutes can now auto-expire if `expires_in` parameter was given while adding the mute. + - Admin API: An endpoint to manage frontends. + - Streaming API: Add follow relationships updates. +
+ + ### Fixed + + - Users with `is_discoverable` field set to false (default value) will appear in in-service search results but be hidden from external services (search bots etc.). + - Streaming API: Posts and notifications are not dropped, when CLI task is executing. + - Creating incorrect IPv4 address-style HTTP links when encountering certain numbers. + +
+ API Changes + - Mastodon API: Current user is now included in conversation if it's the only participant. + - Mastodon API: Fixed last_status.account being not filled with account data. +
+ + ## Unreleased (Patch) + + ### Fixed + + - Fix ability to update Pleroma Chat push notifications with PUT /api/v1/push/subscription and alert type pleroma:chat_mention + - Emoji Reaction activity filtering from blocked and muted accounts. + + ## [2.2.1] - 2020-12-22 + + ### Changed + - Updated Pleroma FE + + ### Fixed + + - Config generation: rename `Pleroma.Upload.Filter.ExifTool` to `Pleroma.Upload.Filter.Exiftool`. + - S3 Uploads with Elixir 1.11. + - Mix task pleroma.user delete_activities for source installations. + - Search: RUM index search speed has been fixed. + - Rich Media Previews sometimes showed the wrong preview due to a bug following redirects. + - Fixes for the autolinker. + - Forwarded reports duplication from Pleroma instances. + + -
+ API + - Statuses were not displayed for Mastodon forwarded reports. +
+ + ### Upgrade notes + + 1. Restart Pleroma + + ## [2.2.0] - 2020-11-12 + + ### Security + + - Fixed the possibility of using file uploads to spoof posts. + ### Changed - **Breaking** Requires `libmagic` (or `file`) to guess file types. diff --cc docs/API/differences_in_mastoapi_responses.md index 3cb2183bd,1b197e073..84430408b --- a/docs/API/differences_in_mastoapi_responses.md +++ b/docs/API/differences_in_mastoapi_responses.md @@@ -184,9 -206,8 +206,9 @@@ Additional parameters can be added to t - `pleroma_settings_store` - Opaque user settings to be saved on the backend. - `skip_thread_containment` - if true, skip filtering out broken threads - `allow_following_move` - if true, allows automatically follow moved following accounts +- `also_known_as` - array of ActivityPub IDs, needed for following move - `pleroma_background_image` - sets the background image of the user. Can be set to "" (an empty string) to reset. - - `discoverable` - if true, discovery of this account in search results and other services is allowed. + - `discoverable` - if true, external services (search bots) etc. are allowed to index / list the account (regardless of this setting, user will still appear in regular search results). - `actor_type` - the type of this account. - `accepts_chat_messages` - if false, this account will reject all chat messages. diff --cc lib/pleroma/user.ex index 120034db4,bd4801058..7b26ac7a3 --- a/lib/pleroma/user.ex +++ b/lib/pleroma/user.ex @@@ -497,8 -521,9 +523,8 @@@ defmodule Pleroma.User d :fields, :raw_fields, :pleroma_settings_store, - :discoverable, + :is_discoverable, :actor_type, - :also_known_as, :accepts_chat_messages ] ) @@@ -2399,12 -2454,7 +2456,16 @@@ |> Map.put(:fields, fields) end + defp validate_also_known_as(changeset) do + validate_change(changeset, :also_known_as, fn :also_known_as, also_known_as -> + case Enum.all?(also_known_as, fn a -> Regex.match?(@url_regex, a) end) do + true -> [] + false -> [also_known_as: "Invalid ap_id format. Must be a URL."] + end + end) + end ++ + def get_host(%User{ap_id: ap_id} = _user) do + URI.parse(ap_id).host + end end diff --cc lib/pleroma/web/mastodon_api/controllers/account_controller.ex index fb1552f21,b4375872b..3951d10ac --- a/lib/pleroma/web/mastodon_api/controllers/account_controller.ex +++ b/lib/pleroma/web/mastodon_api/controllers/account_controller.ex @@@ -185,8 -184,6 +184,7 @@@ defmodule Pleroma.Web.MastodonAPI.Accou :show_role, :skip_thread_containment, :allow_following_move, + :also_known_as, - :discoverable, :accepts_chat_messages ] |> Enum.reduce(%{}, fn key, acc -> @@@ -210,8 -207,10 +208,11 @@@ if bot, do: {:ok, "Service"}, else: {:ok, "Person"} end) |> Maps.put_if_present(:actor_type, params[:actor_type]) + |> Maps.put_if_present(:also_known_as, params[:also_known_as]) + # Note: param name is indeed :locked (not an error) |> Maps.put_if_present(:is_locked, params[:locked]) + # Note: param name is indeed :discoverable (not an error) + |> Maps.put_if_present(:is_discoverable, params[:discoverable]) # What happens here: #