Merge branch 'nil_pinned_objects_cope' into 'develop'
Don't blow up when there are nil pinned objects on a user Closes #49 See merge request soapbox-pub/soapbox!54
This commit is contained in:
commit
e62d5d08f5
1 changed files with 3 additions and 1 deletions
|
@ -636,12 +636,14 @@ def fetch_user_activities(user, reading_user, params) do
|
|||
end
|
||||
|
||||
defp fetch_activities_for_user(user, reading_user, params) do
|
||||
pinned_object_ids = if user.pinned_objects, do: Map.keys(user.pinned_objects), else: []
|
||||
|
||||
params =
|
||||
params
|
||||
|> 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, pinned_object_ids)
|
||||
|
||||
params =
|
||||
if User.blocks?(reading_user, user) do
|
||||
|
|
Loading…
Reference in a new issue