projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add some debugging to federations.
[akkoma]
/
lib
/
pleroma
/
activity.ex
diff --git
a/lib/pleroma/activity.ex
b/lib/pleroma/activity.ex
index 46568bb13eb288d6322b145db776e5427aa5e9c8..d77c8899749a7dd16e568829e3a77340392afa31 100644
(file)
--- a/
lib/pleroma/activity.ex
+++ b/
lib/pleroma/activity.ex
@@
-5,6
+5,7
@@
defmodule Pleroma.Activity do
schema "activities" do
field :data, :map
schema "activities" do
field :data, :map
+ field :local, :boolean, default: true
timestamps()
end
timestamps()
end
@@
-18,4
+19,9
@@
defmodule Pleroma.Activity do
Repo.all(from activity in Activity,
where: fragment("? @> ?", activity.data, ^%{object: %{id: ap_id}}))
end
Repo.all(from activity in Activity,
where: fragment("? @> ?", activity.data, ^%{object: %{id: ap_id}}))
end
+
+ def get_create_activity_by_object_ap_id(ap_id) do
+ Repo.one(from activity in Activity,
+ where: fragment("? @> ?", activity.data, ^%{type: "Create", object: %{id: ap_id}}))
+ end
end
end