Verified Commit cf9ba8fe authored by Haelwenn's avatar Haelwenn
Browse files

transmogrifier.ex: Add fix_summary/1

MRF.KeywordPolicy assumes that summary is present in a activity,
and this would probably simplify code elsewhere too anyway.
parent 3f8be270
Pipeline #10306 passed with stages
in 5 minutes and 5 seconds
......@@ -83,6 +83,22 @@ def fix_object(object) do
|> fix_content_map
|> fix_likes
|> fix_addressing
|> fix_summary
end
def fix_summary(%{"summary" => nil} = object) do
object
|> Map.put("summary", "")
end
def fix_summary(%{"summary" => _} = object) do
# summary is present, nothing to do
object
end
def fix_summary(object) do
object
|> Map.put("summary", "")
end
def fix_addressing_list(map, field) do
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment