projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Let favourites and emoji reactions optionally be hidden
[akkoma]
/
lib
/
pleroma
/
web
/
activity_pub
/
transmogrifier.ex
diff --git
a/lib/pleroma/web/activity_pub/transmogrifier.ex
b/lib/pleroma/web/activity_pub/transmogrifier.ex
index 884646cebf98ce45e85a342523e16ac41e2c28f5..35aa05eb5a1025bfd725dd5d11f7acd739d19c5f 100644
(file)
--- a/
lib/pleroma/web/activity_pub/transmogrifier.ex
+++ b/
lib/pleroma/web/activity_pub/transmogrifier.ex
@@
-62,15
+62,17
@@
defmodule Pleroma.Web.ActivityPub.Transmogrifier do
def fix_summary(object), do: Map.put(object, "summary", "")
def fix_addressing_list(map, field) do
def fix_summary(object), do: Map.put(object, "summary", "")
def fix_addressing_list(map, field) do
+ addrs = map[field]
+
cond do
cond do
- is_
binary(map[field]
) ->
- Map.put(map, field,
[map[field]]
)
+ is_
list(addrs
) ->
+ Map.put(map, field,
Enum.filter(addrs, &is_binary/1)
)
- is_
nil(map[field]
) ->
- Map.put(map, field, [])
+ is_
binary(addrs
) ->
+ Map.put(map, field, [
addrs
])
true ->
true ->
- map
+ Map.put(map, field, [])
end
end
end
end
@@
-176,7
+178,7
@@
defmodule Pleroma.Web.ActivityPub.Transmogrifier do
|> Map.drop(["conversation"])
else
e ->
|> Map.drop(["conversation"])
else
e ->
- Logger.
error
("Couldn't fetch #{inspect(in_reply_to_id)}, error: #{inspect(e)}")
+ Logger.
warn
("Couldn't fetch #{inspect(in_reply_to_id)}, error: #{inspect(e)}")
object
end
else
object
end
else