Skip to content
Snippets Groups Projects
Commit 144dc048 authored by kaniini's avatar kaniini
Browse files

user: only consider `to` recipients as mention targets

parent a44d87f0
Branches
No related tags found
No related merge requests found
......@@ -472,7 +472,7 @@ defmodule Pleroma.User 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 @@ defmodule Pleroma.User do
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(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment