forked from YokaiRick/akkoma
user: only consider to
recipients as mention targets
This commit is contained in:
parent
a44d87f059
commit
144dc048b8
1 changed files with 4 additions and 2 deletions
|
@ -472,7 +472,7 @@ def get_notified_from_activity_query(to) do
|
||||||
)
|
)
|
||||||
end
|
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"])
|
object = Object.normalize(data["object"])
|
||||||
actor = User.get_cached_by_ap_id(data["actor"])
|
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)
|
Repo.all(query)
|
||||||
end
|
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)
|
query = get_notified_from_activity_query(to)
|
||||||
|
|
||||||
Repo.all(query)
|
Repo.all(query)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def get_notified_from_activity(_), do: []
|
||||||
|
|
||||||
def get_recipients_from_activity(%Activity{recipients: to}) do
|
def get_recipients_from_activity(%Activity{recipients: to}) do
|
||||||
query =
|
query =
|
||||||
from(
|
from(
|
||||||
|
|
Loading…
Reference in a new issue