CommonFixes: Use Maps.filter_empty_values on fix_object_defaults
This commit is contained in:
parent
0de1a7629c
commit
acef2a4a40
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
defmodule Pleroma.Web.ActivityPub.ObjectValidators.CommonFixes do
|
defmodule Pleroma.Web.ActivityPub.ObjectValidators.CommonFixes do
|
||||||
alias Pleroma.EctoType.ActivityPub.ObjectValidators
|
alias Pleroma.EctoType.ActivityPub.ObjectValidators
|
||||||
|
alias Pleroma.Maps
|
||||||
alias Pleroma.Object
|
alias Pleroma.Object
|
||||||
alias Pleroma.Object.Containment
|
alias Pleroma.Object.Containment
|
||||||
alias Pleroma.User
|
alias Pleroma.User
|
||||||
@ -24,6 +25,8 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidators.CommonFixes do
|
|||||||
end
|
end
|
||||||
|
|
||||||
def fix_object_defaults(data) do
|
def fix_object_defaults(data) do
|
||||||
|
data = Maps.filter_empty_values(data)
|
||||||
|
|
||||||
context =
|
context =
|
||||||
Utils.maybe_create_context(
|
Utils.maybe_create_context(
|
||||||
data["context"] || data["conversation"] || data["inReplyTo"] || data["id"]
|
data["context"] || data["conversation"] || data["inReplyTo"] || data["id"]
|
||||||
|
Loading…
Reference in New Issue
Block a user