Skip to content
Snippets Groups Projects
Commit d487b753 authored by kaniini's avatar kaniini
Browse files

activitypub: transmogrifier: do not allow missing lists to be interpreted as nil

parent 798da288
No related branches found
No related tags found
No related merge requests found
......@@ -86,11 +86,15 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do
end
def fix_addressing_list(map, field) do
if is_binary(map[field]) do
map
|> Map.put(field, [map[field]])
else
map
cond do
is_binary(map[field]) ->
Map.put(map, field, [map[field]])
is_nil(map[field]) ->
Map.put(map, field, [])
true ->
map
end
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment