Fix posts being streamed to non-local websocket channels.

This commit is contained in:
eal 2017-11-20 07:58:43 +02:00
commit bd921ca5d7
2 changed files with 4 additions and 3 deletions

View file

@ -286,12 +286,12 @@ defmodule Pleroma.User do
def get_recipients_from_activity(%Activity{data: %{"to" => to}}) do
query = from u in User,
where: u.local == true
query = from u in query,
where: u.ap_id in ^to,
or_where: fragment("? \\\?| ?", u.following, ^to)
query = from u in query,
where: u.local == true
Repo.all(query)
end