Allow attaching emojis to user lists

Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
nicole mikołajczyk 2026-06-23 16:08:52 +02:00
commit c6d1cead83
9 changed files with 168 additions and 7 deletions

View file

@ -41,7 +41,8 @@ defmodule Pleroma.Web.ApiSpec.ListOperation do
responses: %{
200 => Operation.response("List", "application/json", List),
400 => Operation.response("Error", "application/json", ApiError),
404 => Operation.response("Error", "application/json", ApiError)
404 => Operation.response("Error", "application/json", ApiError),
422 => Operation.response("Error", "application/json", ApiError)
}
}
end
@ -175,7 +176,8 @@ defmodule Pleroma.Web.ApiSpec.ListOperation do
exclusive: %Schema{
type: :boolean,
description: "Whether members of the list should be removed from the “Home” feed"
}
},
emoji: %Schema{type: :string, description: "List emoji", nullable: true}
},
required: [:title]
},
@ -194,7 +196,8 @@ defmodule Pleroma.Web.ApiSpec.ListOperation do
exclusive: %Schema{
type: :boolean,
description: "Whether members of the list should be removed from the “Home” feed"
}
},
emoji: %Schema{type: :string, description: "List emoji", nullable: true}
}
},
required: true

View file

@ -17,11 +17,26 @@ defmodule Pleroma.Web.ApiSpec.Schemas.List do
exclusive: %Schema{
type: :boolean,
description: "Whether members of the list should be removed from the “Home” feed"
},
pleroma: %Schema{
type: :object,
properties: %{
emoji: %Schema{type: :string, description: "List emoji", nullable: true},
emoji_url: %Schema{
type: :string,
description: "URL of the list emoji if it's a custom emoji, null otherwise",
nullable: true
}
}
}
},
example: %{
"id" => "12249",
"title" => "Friends"
"title" => "Friends",
"pleroma" => %{
"emoji" => nil,
"emoji_url" => nil
}
}
})
end