Add some debugging info.
This commit is contained in:
parent
db08498a9f
commit
e49770ee88
1 changed files with 2 additions and 0 deletions
|
@ -2,6 +2,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
|
||||||
alias Pleroma.{Activity, Repo, Object, Upload, User, Web}
|
alias Pleroma.{Activity, Repo, Object, Upload, User, Web}
|
||||||
alias Ecto.{Changeset, UUID}
|
alias Ecto.{Changeset, UUID}
|
||||||
import Ecto.Query
|
import Ecto.Query
|
||||||
|
require Logger
|
||||||
|
|
||||||
def insert(map, local \\ true) when is_map(map) do
|
def insert(map, local \\ true) when is_map(map) do
|
||||||
map = map
|
map = map
|
||||||
|
@ -9,6 +10,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
|
||||||
|> Map.put_new_lazy("published", &make_date/0)
|
|> Map.put_new_lazy("published", &make_date/0)
|
||||||
|
|
||||||
with %Activity{} = activity <- Activity.get_by_ap_id(map["id"]) do
|
with %Activity{} = activity <- Activity.get_by_ap_id(map["id"]) do
|
||||||
|
Logger.debug(fn -> "Already have activity, #{activity.id}, not inserting." end)
|
||||||
{:ok, activity}
|
{:ok, activity}
|
||||||
else _e ->
|
else _e ->
|
||||||
map = if is_map(map["object"]) do
|
map = if is_map(map["object"]) do
|
||||||
|
|
Loading…
Reference in a new issue