Commit 1089d365 authored by kaniini's avatar kaniini
Browse files

user: fix up notification last calculation [NOT related to upstream]

parent 46c7c238
......@@ -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
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
to =
(to ++ [["actor"]])
if actor.nickname != nil do
(to ++ [["actor"]])
|> Enum.uniq()
query = get_notified_from_activity_query(to)
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