diff options
author | kaniini <ariadne@dereferenced.org> | 2019-07-23 19:13:55 +0000 |
---|---|---|
committer | kaniini <ariadne@dereferenced.org> | 2019-07-23 19:13:55 +0000 |
commit | 03d89e182e0323f775232a4ddab66615f39dc765 (patch) | |
tree | 48a28b791485eef83f847c83f15f870150eb8308 /lib | |
parent | 638f772356afdb92a722ae54059604dbbab94d58 (diff) | |
parent | ec7b085b76996bee7eaa60c21b9d8a0cba382a65 (diff) | |
download | pleroma-03d89e182e0323f775232a4ddab66615f39dc765.tar.gz |
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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/web/common_api/utils.ex | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/pleroma/web/common_api/utils.ex b/lib/pleroma/web/common_api/utils.ex index fcc000969..94462c3dd 100644 --- a/lib/pleroma/web/common_api/utils.ex +++ b/lib/pleroma/web/common_api/utils.ex @@ -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 |