Allow local user to have group actor type

https://git.pleroma.social/pleroma/pleroma/-/issues/3205
This commit is contained in:
tusooa 2023-11-05 18:49:31 -05:00
commit 7a58ddfa48
No known key found for this signature in database
GPG key ID: 42AEC43D48433C51
4 changed files with 35 additions and 2 deletions

View file

@ -732,4 +732,20 @@ defmodule Pleroma.Web.MastodonAPI.UpdateCredentialsTest do
assert account["source"]["pleroma"]["actor_type"] == "Person"
end
end
describe "Mark account as group" do
setup do: oauth_access(["write:accounts"])
setup :request_content_type
test "changing actor_type to Group makes account a Group and enables bot indicator for backward compatibility",
%{conn: conn} do
account =
conn
|> patch("/api/v1/accounts/update_credentials", %{actor_type: "Group"})
|> json_response_and_validate_schema(200)
assert account["bot"]
assert account["source"]["pleroma"]["actor_type"] == "Group"
end
end
end