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
14a9dd46
Commit
14a9dd46
authored
Jun 20, 2017
by
lain
Browse files
Use more efficient query.
parent
fe27b61a
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/pleroma/activity.ex
View file @
14a9dd46
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
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