forked from AkkomaGang/akkoma
Merge branch 'hotfix/fix_undefined_summary' into 'develop'
transmogrifier.ex: Add fix_summary/1 See merge request pleroma/pleroma!1039
This commit is contained in:
commit
0ab563d334
1 changed files with 16 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue