- `settings_store`: A generic map of settings for frontends. Opaque to the backend. Only returned in `verify_credentials` and `update_credentials`
- `chat_token`: The token needed for Pleroma chat. Only returned in `verify_credentials`
-### Extensions for PleromaFE
-
-These endpoints added for controlling PleromaFE features over the Mastodon API
-
-- PATCH `/api/v1/accounts/update_avatar`: Set/clear user avatar image
-- PATCH `/api/v1/accounts/update_banner`: Set/clear user banner image
-- PATCH `/api/v1/accounts/update_background`: Set/clear user background image
-
### Source
Has these additional fields under the `pleroma` object:
]
```
+## `/api/v1/pleroma/accounts/update_*`
+### Set and clear account avatar, banner, and background
+
+- PATCH `/api/v1/pleroma/accounts/update_avatar`: Set/clear user avatar image
+- PATCH `/api/v1/pleroma/accounts/update_banner`: Set/clear user banner image
+- PATCH `/api/v1/pleroma/accounts/update_background`: Set/clear user background image
+
## `/api/v1/pleroma/mascot`
### Gets user mascot image
* Method `GET`
patch("/accounts/update_credentials", MastodonAPIController, :update_credentials)
- patch("/accounts/update_avatar", MastodonAPIController, :update_avatar)
- patch("/accounts/update_banner", MastodonAPIController, :update_banner)
- patch("/accounts/update_background", MastodonAPIController, :update_background)
-
post("/statuses", MastodonAPIController, :post_status)
delete("/statuses/:id", MastodonAPIController, :delete_status)
put("/filters/:id", MastodonAPIController, :update_filter)
delete("/filters/:id", MastodonAPIController, :delete_filter)
+ patch("/pleroma/accounts/update_avatar", MastodonAPIController, :update_avatar)
+ patch("/pleroma/accounts/update_banner", MastodonAPIController, :update_banner)
+ patch("/pleroma/accounts/update_background", MastodonAPIController, :update_background)
+
get("/pleroma/mascot", MastodonAPIController, :get_mascot)
put("/pleroma/mascot", MastodonAPIController, :set_mascot)
conn =
conn
|> assign(:user, user)
- |> patch("/api/v1/accounts/update_avatar", %{img: avatar_image})
+ |> patch("/api/v1/pleroma/accounts/update_avatar", %{img: avatar_image})
user = refresh_record(user)
conn =
conn
|> assign(:user, user)
- |> patch("/api/v1/accounts/update_avatar", %{img: ""})
+ |> patch("/api/v1/pleroma/accounts/update_avatar", %{img: ""})
user = User.get_cached_by_id(user.id)
conn =
conn
|> assign(:user, user)
- |> patch("/api/v1/accounts/update_banner", %{"banner" => @image})
+ |> patch("/api/v1/pleroma/accounts/update_banner", %{"banner" => @image})
user = refresh_record(user)
assert user.info.banner["type"] == "Image"
conn =
conn
|> assign(:user, user)
- |> patch("/api/v1/accounts/update_banner", %{"banner" => ""})
+ |> patch("/api/v1/pleroma/accounts/update_banner", %{"banner" => ""})
user = refresh_record(user)
assert user.info.banner == %{}
conn =
conn
|> assign(:user, user)
- |> patch("/api/v1/accounts/update_background", %{"img" => @image})
+ |> patch("/api/v1/pleroma/accounts/update_background", %{"img" => @image})
user = refresh_record(user)
assert user.info.background["type"] == "Image"
conn =
conn
|> assign(:user, user)
- |> patch("/api/v1/accounts/update_background", %{"img" => ""})
+ |> patch("/api/v1/pleroma/accounts/update_background", %{"img" => ""})
user = refresh_record(user)
assert user.info.background == %{}