From 84b9a9d49749603ca1e21042c194032772c924e7 Mon Sep 17 00:00:00 2001 From: href Date: Fri, 14 Dec 2018 17:24:33 +0100 Subject: [PATCH] TwitterAPI.ActivityView: Ignore unhandled activities --- lib/pleroma/web/twitter_api/views/activity_view.ex | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/pleroma/web/twitter_api/views/activity_view.ex b/lib/pleroma/web/twitter_api/views/activity_view.ex index e5caed28f..e4d364118 100644 --- a/lib/pleroma/web/twitter_api/views/activity_view.ex +++ b/lib/pleroma/web/twitter_api/views/activity_view.ex @@ -14,6 +14,7 @@ defmodule Pleroma.Web.TwitterAPI.ActivityView do alias Pleroma.HTML import Ecto.Query + require Logger defp query_context_ids([]), do: [] @@ -276,6 +277,11 @@ defmodule Pleroma.Web.TwitterAPI.ActivityView do } end + def render("activity.json", %{activity: unhandled_activity}) do + Logger.warn("#{__MODULE__} unhandled activity: #{inspect(unhandled_activity)}") + nil + end + def render_content(%{"type" => "Note"} = object) do summary = object["summary"] -- 2.45.2