- Media preview proxy (requires `ffmpeg` and `ImageMagick` to be installed and media proxy to be enabled; see `:media_preview_proxy` config for more details).
- Pleroma API: Importing the mutes users from CSV files.
- Experimental websocket-based federation between Pleroma instances.
+- Support pagination of blocks and mutes
+ - App metrics: ability to restrict access to specified IP whitelist.
+ - Configuration: Add `:instance, autofollowing_nicknames` setting to provide a way to make accounts automatically follow new users that register on the local Pleroma instance.
### Changed
- **Breaking** Requires `libmagic` (or `file`) to guess file types.
- **Breaking:** Pleroma Admin API: emoji packs and files routes changed.
- **Breaking:** Sensitive/NSFW statuses no longer disable link previews.
+ - **Breaking:** App metrics endpoint (`/api/pleroma/app_metrics`) is disabled by default, check `docs/API/prometheus.md` on enabling and configuring.
- Search: Users are now findable by their urls.
- Renamed `:await_up_timeout` in `:connections_pool` namespace to `:connect_timeout`, old name is deprecated.
- Renamed `:timeout` in `pools` namespace to `:recv_timeout`, old name is deprecated.
- Add documented-but-missing chat pagination.
- Allow sending out emails again.
+ - Allow sending chat messages to yourself.
+ - Fix remote users with a whitespace name.
+ - OStatus / static FE endpoints: fixed inaccessibility for anonymous users on non-federating instances, switched to handling per `:restrict_unauthenticated` setting.
## Unreleased (Patch)
test "works by nickname" do
user = insert(:user)
- assert %{"id" => user_id} =
+ assert %{"id" => _user_id} =
build_conn()
|> get("/api/v1/accounts/#{user.nickname}")
|> json_response_and_validate_schema(200)
user = insert(:user, nickname: "user@example.com", local: false)
- assert %{"id" => user_id} =
+ assert %{"id" => _user_id} =
build_conn()
|> get("/api/v1/accounts/#{user.nickname}")
|> json_response_and_validate_schema(200)
test "returns lists to which the account belongs" do
%{user: user, conn: conn} = oauth_access(["read:lists"])
other_user = insert(:user)
- assert {:ok, %Pleroma.List{id: list_id} = list} = Pleroma.List.create("Test List", user)
+ assert {:ok, %Pleroma.List{id: _list_id} = list} = Pleroma.List.create("Test List", user)
{:ok, %{following: _following}} = Pleroma.List.follow(list, other_user)
- assert [%{"id" => list_id, "title" => "Test List"}] =
+ assert [%{"id" => _list_id, "title" => "Test List"}] =
conn
|> get("/api/v1/accounts/#{other_user.id}/lists")
|> json_response_and_validate_schema(200)
test "getting a list of mutes" do
%{user: user, conn: conn} = oauth_access(["read:mutes"])
- other_user = insert(:user)
+ %{id: id1} = other_user1 = insert(:user)
+ %{id: id2} = other_user2 = insert(:user)
+ %{id: id3} = other_user3 = insert(:user)
+
+ {:ok, _user_relationships} = User.mute(user, other_user1)
+ {:ok, _user_relationships} = User.mute(user, other_user2)
+ {:ok, _user_relationships} = User.mute(user, other_user3)
+
+ result =
+ conn
+ |> assign(:user, user)
+ |> get("/api/v1/mutes")
+ |> json_response_and_validate_schema(200)
+
+ assert [id1, id2, id3] == Enum.map(result, & &1["id"])
+
+ result =
+ conn
+ |> assign(:user, user)
+ |> get("/api/v1/mutes?limit=1")
+ |> json_response_and_validate_schema(200)
- {:ok, _user_relationships} = User.mute(user, other_user)
+ assert [%{"id" => ^id1}] = result
- conn = get(conn, "/api/v1/mutes")
+ result =
+ conn
+ |> assign(:user, user)
+ |> get("/api/v1/mutes?since_id=#{id1}")
+ |> json_response_and_validate_schema(200)
+
+ assert [%{"id" => ^id2}, %{"id" => ^id3}] = result
+
+ result =
+ conn
+ |> assign(:user, user)
+ |> get("/api/v1/mutes?since_id=#{id1}&max_id=#{id3}")
+ |> json_response_and_validate_schema(200)
+
+ assert [%{"id" => ^id2}] = result
+
+ result =
+ conn
+ |> assign(:user, user)
+ |> get("/api/v1/mutes?since_id=#{id1}&limit=1")
+ |> json_response_and_validate_schema(200)
- other_user_id = to_string(other_user.id)
- assert [%{"id" => ^other_user_id}] = json_response_and_validate_schema(conn, 200)
+ assert [%{"id" => ^id2}] = result
end
test "getting a list of blocks" do
%{user: user, conn: conn} = oauth_access(["read:blocks"])
- other_user = insert(:user)
+ %{id: id1} = other_user1 = insert(:user)
+ %{id: id2} = other_user2 = insert(:user)
+ %{id: id3} = other_user3 = insert(:user)
- {:ok, _user_relationship} = User.block(user, other_user)
+ {:ok, _user_relationship} = User.block(user, other_user1)
+ {:ok, _user_relationship} = User.block(user, other_user3)
+ {:ok, _user_relationship} = User.block(user, other_user2)
- conn =
+ result =
conn
|> assign(:user, user)
|> get("/api/v1/blocks")
+ |> json_response_and_validate_schema(200)
+
+ assert [id1, id2, id3] == Enum.map(result, & &1["id"])
+
+ result =
+ conn
+ |> assign(:user, user)
+ |> get("/api/v1/blocks?limit=1")
+ |> json_response_and_validate_schema(200)
+
+ assert [%{"id" => ^id1}] = result
+
+ result =
+ conn
+ |> assign(:user, user)
+ |> get("/api/v1/blocks?since_id=#{id1}")
+ |> json_response_and_validate_schema(200)
+
+ assert [%{"id" => ^id2}, %{"id" => ^id3}] = result
+
+ result =
+ conn
+ |> assign(:user, user)
+ |> get("/api/v1/blocks?since_id=#{id1}&max_id=#{id3}")
+ |> json_response_and_validate_schema(200)
+
+ assert [%{"id" => ^id2}] = result
+
+ result =
+ conn
+ |> assign(:user, user)
+ |> get("/api/v1/blocks?since_id=#{id1}&limit=1")
+ |> json_response_and_validate_schema(200)
- other_user_id = to_string(other_user.id)
- assert [%{"id" => ^other_user_id}] = json_response_and_validate_schema(conn, 200)
+ assert [%{"id" => ^id2}] = result
end
end