Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Pleroma
pleroma
Commits
e49770ee
Commit
e49770ee
authored
May 07, 2017
by
lain
Browse files
Add some debugging info.
parent
db08498a
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/pleroma/web/activity_pub/activity_pub.ex
View file @
e49770ee
...
...
@@ -2,6 +2,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
alias
Pleroma
.
{
Activity
,
Repo
,
Object
,
Upload
,
User
,
Web
}
alias
Ecto
.
{
Changeset
,
UUID
}
import
Ecto
.
Query
require
Logger
def
insert
(
map
,
local
\\
true
)
when
is_map
(
map
)
do
map
=
map
...
...
@@ -9,6 +10,7 @@ def insert(map, local \\ true) when is_map(map) do
|>
Map
.
put_new_lazy
(
"published"
,
&
make_date
/
0
)
with
%
Activity
{}
=
activity
<-
Activity
.
get_by_ap_id
(
map
[
"id"
])
do
Logger
.
debug
(
fn
->
"Already have activity,
#{
activity
.
id
}
, not inserting."
end
)
{
:ok
,
activity
}
else
_e
->
map
=
if
is_map
(
map
[
"object"
])
do
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment