Don't blow up when there are nil pinned objects on a user

This commit is contained in:
NEETzsche 2021-11-24 07:33:42 +00:00
parent ec38d0f516
commit 845f3d226f

View file

@ -641,7 +641,7 @@ defp fetch_activities_for_user(user, reading_user, params) do
|> Map.put(:type, ["Create", "Announce"])
|> Map.put(:user, reading_user)
|> Map.put(:actor_id, user.ap_id)
|> Map.put(:pinned_object_ids, Map.keys(user.pinned_objects))
|> Map.put(:pinned_object_ids, (if user.pinned_objects, do: Map.keys(user.pinned_objects), else: []))
params =
if User.blocks?(reading_user, user) do