Safety measures.

This commit is contained in:
Roger Braun 2017-05-07 14:52:19 +02:00
parent a41aa4e489
commit 60b4b0d725
1 changed files with 1 additions and 1 deletions

View File

@ -128,7 +128,7 @@ def to_simple_form(%{data: %{"type" => "Follow"}} = activity, user, with_author)
author = if with_author, do: [{:author, UserRepresenter.to_simple_form(user)}], else: []
mentions = activity.data["to"] |> get_mentions
mentions = (activity.data["to"] || []) |> get_mentions
[
{:"activity:object-type", ['http://activitystrea.ms/schema/1.0/activity']},
{:"activity:verb", ['http://activitystrea.ms/schema/1.0/follow']},