Only search in public data for now.
This should be the data the user is allowed to see later, but this will stop accidental private message leaks.
This commit is contained in:
parent
a9203ab363
commit
70bcdf32bd
3 changed files with 9 additions and 0 deletions
|
|
@ -507,6 +507,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
|
|||
from(
|
||||
a in Activity,
|
||||
where: fragment("?->>'type' = 'Create'", a.data),
|
||||
where: "https://www.w3.org/ns/activitystreams#Public" in a.recipients,
|
||||
where:
|
||||
fragment(
|
||||
"to_tsvector('english', ?->'object'->>'content') @@ plainto_tsquery('english', ?)",
|
||||
|
|
|
|||
|
|
@ -193,6 +193,7 @@ defmodule Pleroma.Web.TwitterAPI.TwitterAPI do
|
|||
from(
|
||||
a in Activity,
|
||||
where: fragment("?->>'type' = 'Create'", a.data),
|
||||
where: "https://www.w3.org/ns/activitystreams#Public" in a.recipients,
|
||||
where:
|
||||
fragment(
|
||||
"to_tsvector('english', ?->'object'->>'content') @@ plainto_tsquery('english', ?)",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue