diff options
author | Haelwenn (lanodan) Monnier <contact@hacktivis.me> | 2021-08-11 21:29:06 +0200 |
---|---|---|
committer | Haelwenn (lanodan) Monnier <contact@hacktivis.me> | 2021-08-11 21:38:10 +0200 |
commit | 61d233921cf1a5f45ade58cb562e9ffdacc291e8 (patch) | |
tree | fc9d1e3cf5de7cbe83ee90beae794244610252fc /lib/pleroma/web/activity_pub | |
parent | 7c1243178b44d629f6881aa1b197641d56bbd0f1 (diff) | |
download | pleroma-61d233921cf1a5f45ade58cb562e9ffdacc291e8.tar.gz |
ObjectValidator.stringify_keys: filter out nil values
Diffstat (limited to 'lib/pleroma/web/activity_pub')
-rw-r--r-- | lib/pleroma/web/activity_pub/object_validator.ex | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/pleroma/web/activity_pub/object_validator.ex b/lib/pleroma/web/activity_pub/object_validator.ex index 6e40d8b72..187cd0cfd 100644 --- a/lib/pleroma/web/activity_pub/object_validator.ex +++ b/lib/pleroma/web/activity_pub/object_validator.ex @@ -213,6 +213,7 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidator do def stringify_keys(object) when is_map(object) do object + |> Enum.filter(fn {_, v} -> v != nil end) |> Map.new(fn {key, val} -> {to_string(key), stringify_keys(val)} end) end |