Fix remote users retweeting local stuff.

This commit is contained in:
Roger Braun 2017-05-08 18:19:45 +02:00
commit 3320c9b176
3 changed files with 131 additions and 4 deletions

View file

@ -176,7 +176,7 @@ defmodule Pleroma.Web.OStatus do
# TODO: Bail out sooner and use transaction.
if Object.get_by_ap_id(id) do
{:error, "duplicate activity"}
{:ok, Activity.get_create_activity_by_object_ap_id(id)}
else
ActivityPub.create(to, actor, context, object, %{}, date, false)
end