fix tag feeds: remote activities might not have a summary field

This commit is contained in:
faried nawaz 2023-03-06 00:20:54 +05:00
parent 714bf0cb23
commit f33e89765a
1 changed files with 2 additions and 1 deletions

View File

@ -72,7 +72,8 @@ def logo(user) do
def last_activity(activities), do: List.last(activities) def last_activity(activities), do: List.last(activities)
def activity_title(%{"content" => content, "summary" => summary} = data, opts \\ %{}) do def activity_title(%{"content" => content} = data, opts \\ %{}) do
summary = Map.get(data, "summary", "")
title = title =
cond do cond do
summary != "" -> summary summary != "" -> summary