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
38f3908c
Commit
38f3908c
authored
Oct 19, 2017
by
Roger Braun
Browse files
Revert "Simplify query."
This reverts commit
a17b2613
.
parent
6af164f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/pleroma/web/activity_pub/activity_pub.ex
View file @
38f3908c
...
...
@@ -118,8 +118,11 @@ defp restrict_tag(query, %{"tag" => tag}) do
defp
restrict_tag
(
query
,
_
),
do
:
query
defp
restrict_recipients
(
query
,
recipients
)
do
from
activity
in
query
,
where:
fragment
(
"?->'to'
\\
\?| ? "
,
activity
.
data
,
^
recipients
)
Enum
.
reduce
(
recipients
,
query
,
fn
(
recipient
,
q
)
->
map
=
%{
to:
[
recipient
]
}
from
activity
in
q
,
or_where:
fragment
(
~s(? @> ?)
,
activity
.
data
,
^
map
)
end
)
end
defp
restrict_local
(
query
,
%{
"local_only"
=>
true
})
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