logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma
commit: 1089d3658e30dc9beabd3d6985712ab3837fe41a
parent: 46c7c2380c9f923b6c9e1521b025fd45aed0ae37
Author: William Pitcock <nenolod@dereferenced.org>
Date:   Mon,  6 Aug 2018 11:20:41 +0000

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

Diffstat:

Mlib/pleroma/user.ex7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex @@ -467,10 +467,15 @@ defmodule Pleroma.User 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 ++ [object.data["actor"]]) + if actor.nickname != nil do + (to ++ [object.data["actor"]]) + else + to + end |> Enum.uniq() query = get_notified_from_activity_query(to)