user: fix up notification last calculation [NOT related to upstream]
This commit is contained in:
parent
46c7c2380c
commit
1089d3658e
|
@ -467,10 +467,15 @@ def get_notified_from_activity_query(to) do
|
||||||
|
|
||||||
def get_notified_from_activity(%Activity{recipients: to, data: %{"type" => "Announce"} = data}) do
|
def get_notified_from_activity(%Activity{recipients: to, data: %{"type" => "Announce"} = data}) do
|
||||||
object = Object.normalize(data["object"])
|
object = Object.normalize(data["object"])
|
||||||
|
actor = User.get_cached_by_ap_id(data["actor"])
|
||||||
|
|
||||||
# ensure that the actor who published the announced object appears only once
|
# ensure that the actor who published the announced object appears only once
|
||||||
to =
|
to =
|
||||||
(to ++ [object.data["actor"]])
|
if actor.nickname != nil do
|
||||||
|
(to ++ [object.data["actor"]])
|
||||||
|
else
|
||||||
|
to
|
||||||
|
end
|
||||||
|> Enum.uniq()
|
|> Enum.uniq()
|
||||||
|
|
||||||
query = get_notified_from_activity_query(to)
|
query = get_notified_from_activity_query(to)
|
||||||
|
|
Loading…
Reference in New Issue