Commit 144dc048 authored by kaniini's avatar kaniini
Browse files

user: only consider `to` recipients as mention targets

parent a44d87f0
......@@ -472,7 +472,7 @@ def get_notified_from_activity_query(to) do
)
end
def get_notified_from_activity(%Activity{recipients: to, data: %{"type" => "Announce"} = data}) do
def get_notified_from_activity(%Activity{data: %{"type" => "Announce", "to" => to} = data}) do
object = Object.normalize(data["object"])
actor = User.get_cached_by_ap_id(data["actor"])
......@@ -490,12 +490,14 @@ def get_notified_from_activity(%Activity{recipients: to, data: %{"type" => "Anno
Repo.all(query)
end
def get_notified_from_activity(%Activity{recipients: to}) do
def get_notified_from_activity(%Activity{data: %{"to" => to}}) do
query = get_notified_from_activity_query(to)
Repo.all(query)
end
def get_notified_from_activity(_), do: []
def get_recipients_from_activity(%Activity{recipients: to}) do
query =
from(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment