Merge remote-tracking branch 'upstream/develop' into aliases
authorAlex Gleason <alex@alexgleason.me>
Wed, 14 Oct 2020 17:33:24 +0000 (12:33 -0500)
committerAlex Gleason <alex@alexgleason.me>
Wed, 14 Oct 2020 17:33:24 +0000 (12:33 -0500)
1  2 
CHANGELOG.md
lib/pleroma/user.ex
lib/pleroma/web/mastodon_api/controllers/account_controller.ex
lib/pleroma/web/mastodon_api/views/account_view.ex
test/pleroma/web/mastodon_api/update_credentials_test.exs
test/pleroma/web/mastodon_api/views/account_view_test.exs

diff --cc CHANGELOG.md
Simple merge
Simple merge
index 2b981a86467458c167dcc9ab228c029b3f8c46eb,97858a93c5d6126782e4724177527b99efa460d7..fb1552f215127877d6329e9767f23afee74dfcb6
@@@ -211,7 -209,7 +210,8 @@@ defmodule Pleroma.Web.MastodonAPI.Accou
          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])
+       |> Maps.put_if_present(:is_locked, params[:locked])
  
      # What happens here:
      #
index 0d49eb3343fff793805c8008e98325c239cf4f2d,ed1921c9145d2b503b6a1c7160bdab4cbba89961..e99508cd850359b3281c593ac50981d952cc39aa
@@@ -220,19 -220,9 +220,19 @@@ defmodule Pleroma.Web.MastodonAPI.Updat
        assert update_activity.data["object"]["name"] == "markorepairs"
      end
  
 +    test "updates the user's AKAs", %{conn: conn} do
 +      conn =
 +        patch(conn, "/api/v1/accounts/update_credentials", %{
 +          "also_known_as" => ["https://mushroom.kingdom/users/mario"]
 +        })
 +
 +      assert user_data = json_response_and_validate_schema(conn, 200)
 +      assert user_data["pleroma"]["also_known_as"] == ["https://mushroom.kingdom/users/mario"]
 +    end
 +
      test "updates the user's avatar", %{user: user, conn: conn} do
        new_avatar = %Plug.Upload{
-         content_type: "image/jpg",
+         content_type: "image/jpeg",
          path: Path.absname("test/fixtures/image.jpg"),
          filename: "an_image.jpg"
        }