- **Breaking**: Changed `mix pleroma.user toggle_confirmed` to `mix pleroma.user confirm`
- **Breaking**: Changed `mix pleroma.user toggle_activated` to `mix pleroma.user activate/deactivate`
- - **Breaking**: AdminAPI changed User field `confirmation_pending` to `is_confirmed`
- - **Breaking**: AdminAPI changed User field `approval_pending` to `is_approved`
- - **Breaking**: AdminAPI changed User field `deactivated` to `is_active`
- 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.
- 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.
- - Admin API: Reports now ordered by newest
- Deprecated `Pleroma.Uploaders.S3, :public_endpoint`. Now `Pleroma.Upload, :base_url` is the standard configuration key for all uploaders.
- Improved Apache webserver support: updated sample configuration, MediaProxy cache invalidation verified with the included sample script
+ - Improve OAuth 2.0 provider support. A missing `fqn` field was added to the response, but does not expose the user's email address.
+
+ <details>
+ <summary>API Changes</summary>
+
+ - **Breaking:** AdminAPI changed User field `confirmation_pending` to `is_confirmed`
+ - **Breaking:** AdminAPI changed User field `approval_pending` to `is_approved`
+ - **Breaking**: AdminAPI changed User field `deactivated` to `is_active`
+ - **Breaking:** AdminAPI `GET /api/pleroma/admin/users/:nickname_or_id/statuses` changed response format and added the number of total users posts.
+ - **Breaking:** AdminAPI `GET /api/pleroma/admin/instances/:instance/statuses` changed response format and added the number of total users posts.
+ - Admin API: Reports now ordered by newest
+
+ </details>
### Added
- 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.
- Configurable background job limits for RichMedia (link previews) and MediaProxyWarmingPolicy
-
+ - Ability to define custom HTTP headers per each frontend
<details>
<summary>API Changes</summary>
- 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.
- - WebPush: Introduce `pleroma:chat_mention` and `pleroma:emoji_reaction` notification types
+ - WebPush: Introduce `pleroma:chat_mention` and `pleroma:emoji_reaction` notification types.
+ - Mastodon API: Add monthly active users to `/api/v1/instance` (`pleroma.stats.mau`).
+ - Mastodon API: Home, public, hashtag & list timelines accept `only_media`, `remote` & `local` parameters for filtration.
+ - Mastodon API: `/api/v1/accounts/:id` & `/api/v1/mutes` endpoints accept `with_relationships` parameter and return filled `pleroma.relationship` field.
</details>
### Fixed
- Creating incorrect IPv4 address-style HTTP links when encountering certain numbers.
- Reblog API Endpoint: Do not set visibility parameter to public by default and let CommonAPI to infer it from status, so a user can reblog their private status without explicitly setting reblog visibility to private.
- Tag URLs in statuses are now absolute
+ - Removed duplicate jobs to purge expired activities
+ - File extensions of some attachments were incorrectly changed. This feature has been disabled for now.
+ - Mix task pleroma.instance creates missing parent directories if the configuration or SQL output paths are changed.
<details>
<summary>API Changes</summary>
- 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.
+ - Mastodon API: Fix not being able to add or remove multiple users at once in lists.
- Mastodon API: Fixed own_votes being not returned with poll data.
+ - Mastodon API: Fixed creation of scheduled posts with polls.
+ - Mastodon API: Support for expires_in/expires_at in the Filters.
</details>
## Unreleased (Patch)
queues: [
activity_expiration: 10,
token_expiration: 5,
+ filter_expiration: 1,
backup: 1,
federator_incoming: 50,
federator_outgoing: 50,
"git" => "https://git.pleroma.social/pleroma/fedi-fe",
"build_url" =>
"https://git.pleroma.social/pleroma/fedi-fe/-/jobs/artifacts/${ref}/download?job=build",
- "ref" => "master"
+ "ref" => "master",
+ "custom-http-headers" => [
+ {"service-worker-allowed", "/"}
+ ]
},
"admin-fe" => %{
"name" => "admin-fe",
alias OpenApiSpex.Operation
alias OpenApiSpex.Schema
alias Pleroma.Web.ApiSpec.Helpers
+ alias Pleroma.Web.ApiSpec.Schemas.ApiError
alias Pleroma.Web.ApiSpec.Schemas.BooleanLike
def open_api_operation(action) do
def index_operation do
%Operation{
- tags: ["apps"],
- summary: "View all filters",
+ tags: ["Filters"],
+ summary: "All filters",
operationId: "FilterController.index",
security: [%{"oAuth" => ["read:filters"]}],
responses: %{
- 200 => Operation.response("Filters", "application/json", array_of_filters())
+ 200 => Operation.response("Filters", "application/json", array_of_filters()),
+ 403 => Operation.response("Error", "application/json", ApiError)
}
}
end
def create_operation do
%Operation{
- tags: ["apps"],
+ tags: ["Filters"],
summary: "Create a filter",
operationId: "FilterController.create",
requestBody: Helpers.request_body("Parameters", create_request(), required: true),
security: [%{"oAuth" => ["write:filters"]}],
- responses: %{200 => Operation.response("Filter", "application/json", filter())}
+ responses: %{
+ 200 => Operation.response("Filter", "application/json", filter()),
+ 403 => Operation.response("Error", "application/json", ApiError)
+ }
}
end
def show_operation do
%Operation{
- tags: ["apps"],
- summary: "View all filters",
+ tags: ["Filters"],
+ summary: "Filter",
parameters: [id_param()],
operationId: "FilterController.show",
security: [%{"oAuth" => ["read:filters"]}],
responses: %{
- 200 => Operation.response("Filter", "application/json", filter())
+ 200 => Operation.response("Filter", "application/json", filter()),
+ 403 => Operation.response("Error", "application/json", ApiError),
+ 404 => Operation.response("Error", "application/json", ApiError)
}
}
end
def update_operation do
%Operation{
- tags: ["apps"],
+ tags: ["Filters"],
summary: "Update a filter",
parameters: [id_param()],
operationId: "FilterController.update",
requestBody: Helpers.request_body("Parameters", update_request(), required: true),
security: [%{"oAuth" => ["write:filters"]}],
responses: %{
- 200 => Operation.response("Filter", "application/json", filter())
+ 200 => Operation.response("Filter", "application/json", filter()),
+ 403 => Operation.response("Error", "application/json", ApiError)
}
}
end
def delete_operation do
%Operation{
- tags: ["apps"],
+ tags: ["Filters"],
summary: "Remove a filter",
parameters: [id_param()],
operationId: "FilterController.delete",
Operation.response("Filter", "application/json", %Schema{
type: :object,
description: "Empty object"
- })
+ }),
+ 403 => Operation.response("Error", "application/json", ApiError)
}
}
end
nullable: true,
description: "Consider word boundaries?",
default: true
+ },
+ expires_in: %Schema{
+ nullable: true,
+ type: :integer,
+ description:
+ "Number of seconds from now the filter should expire. Otherwise, null for a filter that doesn't expire."
}
- # TODO: probably should implement filter expiration
- # expires_in: %Schema{
- # type: :string,
- # format: :"date-time",
- # description:
- # "ISO 8601 Datetime for when the filter expires. Otherwise,
- # null for a filter that doesn't expire."
- # }
},
required: [:phrase, :context],
example: %{
}
end
+ def attachment_note_factory(attrs \\ %{}) do
+ user = attrs[:user] || insert(:user)
+ {length, attrs} = Map.pop(attrs, :length, 1)
+
+ data = %{
+ "attachment" =>
+ Stream.repeatedly(fn -> attachment_data(user.ap_id, attrs[:href]) end)
+ |> Enum.take(length)
+ }
+
+ build(:note, Map.put(attrs, :data, data))
+ end
+
+ defp attachment_data(ap_id, href) do
+ href = href || sequence(:href, &"#{Pleroma.Web.Endpoint.url()}/media/#{&1}.jpg")
+
+ %{
+ "url" => [
+ %{
+ "href" => href,
+ "type" => "Link",
+ "mediaType" => "image/jpeg"
+ }
+ ],
+ "name" => "some name",
+ "type" => "Document",
+ "actor" => ap_id,
+ "mediaType" => "image/jpeg"
+ }
+ end
+
def audio_factory(attrs \\ %{}) do
text = sequence(:text, &"lain radio episode #{&1}")
%Pleroma.Filter{
user: build(:user),
filter_id: sequence(:filter_id, & &1),
- phrase: "cofe"
+ phrase: "cofe",
+ context: ["home"]
}
end
end