Safety measures.
authorRoger Braun <roger@rogerbraun.net>
Sun, 7 May 2017 12:52:19 +0000 (14:52 +0200)
committerRoger Braun <roger@rogerbraun.net>
Sun, 7 May 2017 12:52:19 +0000 (14:52 +0200)
lib/pleroma/web/ostatus/activity_representer.ex

index 076ead41adff3cd0244312bd1cfb7eb8e469dfbc..66e9b0ec23e21450e04355ed048329c8c6417be7 100644 (file)
@@ -128,7 +128,7 @@ defmodule Pleroma.Web.OStatus.ActivityRepresenter do
 
     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']},