Merge branch 'fix/views-ignore-unhandled-activites' into 'develop'
TwitterAPI.ActivityView: Ignore unhandled activities See merge request pleroma/pleroma!547
This commit is contained in:
commit
cc6689cc20
@ -14,6 +14,7 @@ defmodule Pleroma.Web.TwitterAPI.ActivityView do
|
|||||||
alias Pleroma.HTML
|
alias Pleroma.HTML
|
||||||
|
|
||||||
import Ecto.Query
|
import Ecto.Query
|
||||||
|
require Logger
|
||||||
|
|
||||||
defp query_context_ids([]), do: []
|
defp query_context_ids([]), do: []
|
||||||
|
|
||||||
@ -277,6 +278,11 @@ defmodule Pleroma.Web.TwitterAPI.ActivityView do
|
|||||||
}
|
}
|
||||||
end
|
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
|
def render_content(%{"type" => "Note"} = object) do
|
||||||
summary = object["summary"]
|
summary = object["summary"]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user