projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fe27b61
)
Use more efficient query.
author
Roger Braun
<roger@rogerbraun.net>
Tue, 20 Jun 2017 14:02:17 +0000
(16:02 +0200)
committer
Roger Braun
<roger@rogerbraun.net>
Tue, 20 Jun 2017 14:02:17 +0000
(16:02 +0200)
lib/pleroma/activity.ex
patch
|
blob
|
history
diff --git
a/lib/pleroma/activity.ex
b/lib/pleroma/activity.ex
index d77c8899749a7dd16e568829e3a77340392afa31..f48199cae876b8441af760973b5868b1df7d7924 100644
(file)
--- a/
lib/pleroma/activity.ex
+++ b/
lib/pleroma/activity.ex
@@
-12,7
+12,7
@@
defmodule Pleroma.Activity do
def get_by_ap_id(ap_id) do
Repo.one(from activity in Activity,
- where: fragment("
? @> ?", activity.data, ^%{id: ap_id}
))
+ where: fragment("
(?)->>'id' = ?", activity.data, ^to_string(ap_id)
))
end
def all_by_object_ap_id(ap_id) do