Merge branch 'accept-tags-2.5' into 'develop'
TagValidator: Drop unrecognized Tag types Closes #2952 See merge request pleroma/pleroma!3823
This commit is contained in:
commit
0524e66a05
3 changed files with 51 additions and 0 deletions
|
|
@ -68,6 +68,12 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidators.TagValidator do
|
|||
|> validate_required([:type, :name, :icon])
|
||||
end
|
||||
|
||||
def changeset(struct, %{"type" => _} = data) do
|
||||
struct
|
||||
|> cast(data, [])
|
||||
|> Map.put(:action, :ignore)
|
||||
end
|
||||
|
||||
def icon_changeset(struct, data) do
|
||||
struct
|
||||
|> cast(data, [:type, :url])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue