Do not notify in case of by following group actor
This commit is contained in:
parent
e971bc9695
commit
7fdff65f31
|
@ -89,7 +89,7 @@ class ActivityPub::Activity
|
||||||
def distribute(status)
|
def distribute(status)
|
||||||
crawl_links(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)
|
notify_about_mentions(status)
|
||||||
|
|
||||||
# Only continue if the status is supposed to have arrived in real-time.
|
# 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?
|
status.reblog? && status.reblog.account.local?
|
||||||
end
|
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)
|
def notify_about_reblog(status)
|
||||||
NotifyService.new.call(status.reblog.account, status)
|
NotifyService.new.call(status.reblog.account, status)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue