Merge branch 'fix/subscriber-notifications' into 'develop'

Do not notify subscribers for messages from users which are replies to others

See merge request pleroma/pleroma!1477
This commit is contained in:
kaniini 2019-07-23 19:13:55 +00:00
commit 03d89e182e
2 changed files with 29 additions and 0 deletions

View file

@ -439,6 +439,13 @@ defmodule Pleroma.Web.CommonAPI.Utils do
def maybe_notify_mentioned_recipients(recipients, _), do: recipients
# Do not notify subscribers if author is making a reply
def maybe_notify_subscribers(recipients, %Activity{
object: %Object{data: %{"inReplyTo" => _ap_id}}
}) do
recipients
end
def maybe_notify_subscribers(
recipients,
%Activity{data: %{"actor" => actor, "type" => type}} = activity