Move avatar_description and header_description fields to the account object
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
parent
1c685ea41a
commit
3d9ac413af
5 changed files with 11 additions and 4 deletions
1
changelog.d/avatar-description-mastodon-api.change
Normal file
1
changelog.d/avatar-description-mastodon-api.change
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
Move avatar_description and header_description fields to the account object
|
||||||
|
|
@ -127,8 +127,6 @@ Has these additional fields under the `pleroma` object:
|
||||||
- `notification_settings`: object, can be absent. See `/api/v1/pleroma/notification_settings` for the parameters/keys returned.
|
- `notification_settings`: object, can be absent. See `/api/v1/pleroma/notification_settings` for the parameters/keys returned.
|
||||||
- `accepts_chat_messages`: boolean, but can be null if we don't have that information about a user
|
- `accepts_chat_messages`: boolean, but can be null if we don't have that information about a user
|
||||||
- `favicon`: nullable URL string, Favicon image of the user's instance
|
- `favicon`: nullable URL string, Favicon image of the user's instance
|
||||||
- `avatar_description`: string, image description for user avatar, defaults to empty string
|
|
||||||
- `header_description`: string, image description for user banner, defaults to empty string
|
|
||||||
|
|
||||||
### Source
|
### Source
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ defmodule Pleroma.Web.ApiSpec.Schemas.Account do
|
||||||
acct: %Schema{type: :string},
|
acct: %Schema{type: :string},
|
||||||
avatar_static: %Schema{type: :string, format: :uri},
|
avatar_static: %Schema{type: :string, format: :uri},
|
||||||
avatar: %Schema{type: :string, format: :uri},
|
avatar: %Schema{type: :string, format: :uri},
|
||||||
|
avatar_description: %Schema{type: :string},
|
||||||
bot: %Schema{type: :boolean},
|
bot: %Schema{type: :boolean},
|
||||||
created_at: %Schema{type: :string, format: "date-time"},
|
created_at: %Schema{type: :string, format: "date-time"},
|
||||||
display_name: %Schema{type: :string},
|
display_name: %Schema{type: :string},
|
||||||
|
|
@ -31,6 +32,7 @@ defmodule Pleroma.Web.ApiSpec.Schemas.Account do
|
||||||
following_count: %Schema{type: :integer},
|
following_count: %Schema{type: :integer},
|
||||||
header_static: %Schema{type: :string, format: :uri},
|
header_static: %Schema{type: :string, format: :uri},
|
||||||
header: %Schema{type: :string, format: :uri},
|
header: %Schema{type: :string, format: :uri},
|
||||||
|
header_description: %Schema{type: :string},
|
||||||
id: FlakeID,
|
id: FlakeID,
|
||||||
locked: %Schema{type: :boolean},
|
locked: %Schema{type: :boolean},
|
||||||
note: %Schema{type: :string, format: :html},
|
note: %Schema{type: :string, format: :html},
|
||||||
|
|
@ -111,8 +113,8 @@ defmodule Pleroma.Web.ApiSpec.Schemas.Account do
|
||||||
nullable: true,
|
nullable: true,
|
||||||
description: "Favicon image of the user's instance"
|
description: "Favicon image of the user's instance"
|
||||||
},
|
},
|
||||||
avatar_description: %Schema{type: :string},
|
avatar_description: %Schema{type: :string, deprecated: true},
|
||||||
header_description: %Schema{type: :string}
|
header_description: %Schema{type: :string, deprecated: true}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
source: %Schema{
|
source: %Schema{
|
||||||
|
|
|
||||||
|
|
@ -300,8 +300,10 @@ defmodule Pleroma.Web.MastodonAPI.AccountView do
|
||||||
note: user.bio,
|
note: user.bio,
|
||||||
url: user.uri || user.ap_id,
|
url: user.uri || user.ap_id,
|
||||||
avatar: avatar,
|
avatar: avatar,
|
||||||
|
avatar_description: avatar_description,
|
||||||
avatar_static: avatar_static,
|
avatar_static: avatar_static,
|
||||||
header: header,
|
header: header,
|
||||||
|
header_description: header_description,
|
||||||
header_static: header_static,
|
header_static: header_static,
|
||||||
emojis: emojis,
|
emojis: emojis,
|
||||||
fields: user.fields,
|
fields: user.fields,
|
||||||
|
|
|
||||||
|
|
@ -54,8 +54,10 @@ defmodule Pleroma.Web.MastodonAPI.AccountViewTest do
|
||||||
note: "<span>valid html</span>. a<br/>b<br/>c<br/>d<br/>f '&<>"",
|
note: "<span>valid html</span>. a<br/>b<br/>c<br/>d<br/>f '&<>"",
|
||||||
url: user.ap_id,
|
url: user.ap_id,
|
||||||
avatar: "http://localhost:4001/images/avi.png",
|
avatar: "http://localhost:4001/images/avi.png",
|
||||||
|
avatar_description: "",
|
||||||
avatar_static: "http://localhost:4001/images/avi.png",
|
avatar_static: "http://localhost:4001/images/avi.png",
|
||||||
header: "http://localhost:4001/images/banner.png",
|
header: "http://localhost:4001/images/banner.png",
|
||||||
|
header_description: "",
|
||||||
header_static: "http://localhost:4001/images/banner.png",
|
header_static: "http://localhost:4001/images/banner.png",
|
||||||
emojis: [
|
emojis: [
|
||||||
%{
|
%{
|
||||||
|
|
@ -326,8 +328,10 @@ defmodule Pleroma.Web.MastodonAPI.AccountViewTest do
|
||||||
note: user.bio,
|
note: user.bio,
|
||||||
url: user.ap_id,
|
url: user.ap_id,
|
||||||
avatar: "http://localhost:4001/images/avi.png",
|
avatar: "http://localhost:4001/images/avi.png",
|
||||||
|
avatar_description: "",
|
||||||
avatar_static: "http://localhost:4001/images/avi.png",
|
avatar_static: "http://localhost:4001/images/avi.png",
|
||||||
header: "http://localhost:4001/images/banner.png",
|
header: "http://localhost:4001/images/banner.png",
|
||||||
|
header_description: "",
|
||||||
header_static: "http://localhost:4001/images/banner.png",
|
header_static: "http://localhost:4001/images/banner.png",
|
||||||
emojis: [],
|
emojis: [],
|
||||||
fields: [],
|
fields: [],
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue