mirror of
https://github.com/mastodon/mastodon.git
synced 2025-04-01 13:52:21 +02:00
Do not notify in case of by following group actor
This commit is contained in:
parent
e971bc9695
commit
7fdff65f31
1 changed files with 5 additions and 1 deletions
|
@ -89,7 +89,7 @@ class ActivityPub::Activity
|
|||
def distribute(status)
|
||||
crawl_links(status)
|
||||
|
||||
notify_about_reblog(status) if reblog_of_local_account?(status)
|
||||
notify_about_reblog(status) if reblog_of_local_account?(status) && !reblog_by_following_group_account?(status)
|
||||
notify_about_mentions(status)
|
||||
|
||||
# Only continue if the status is supposed to have arrived in real-time.
|
||||
|
@ -105,6 +105,10 @@ class ActivityPub::Activity
|
|||
status.reblog? && status.reblog.account.local?
|
||||
end
|
||||
|
||||
def reblog_by_following_group_account?(status)
|
||||
status.reblog? && status.account.group? && status.reblog.account.following?(status.account)
|
||||
end
|
||||
|
||||
def notify_about_reblog(status)
|
||||
NotifyService.new.call(status.reblog.account, status)
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue