From 60b4b0d725aefdca3eedd2d7708b0c96ee60c5f4 Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Sun, 7 May 2017 14:52:19 +0200 Subject: [PATCH] Safety measures. --- lib/pleroma/web/ostatus/activity_representer.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pleroma/web/ostatus/activity_representer.ex b/lib/pleroma/web/ostatus/activity_representer.ex index 076ead41a..66e9b0ec2 100644 --- a/lib/pleroma/web/ostatus/activity_representer.ex +++ b/lib/pleroma/web/ostatus/activity_representer.ex @@ -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']},