mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-28 05:55:04 +01:00
Only share public statuses.
Only actually public, i.e. not "unlisted". One exception: Share an update if the update changed the visibility from "public" to something else. The fasp can act on this information then.
This commit is contained in:
parent
0b80d39fdd
commit
b0001966c6
@ -13,20 +13,20 @@ module Status::FaspConcern
|
|||||||
private
|
private
|
||||||
|
|
||||||
def announce_new_content_to_subscribed_fasp
|
def announce_new_content_to_subscribed_fasp
|
||||||
return unless account_indexable?
|
return unless account_indexable? && public_visibility?
|
||||||
|
|
||||||
store_uri unless uri # TODO: solve this more elegantly
|
store_uri unless uri # TODO: solve this more elegantly
|
||||||
Fasp::AnnounceContentLifecycleEventWorker.perform_async(uri, 'new')
|
Fasp::AnnounceContentLifecycleEventWorker.perform_async(uri, 'new')
|
||||||
end
|
end
|
||||||
|
|
||||||
def announce_updated_content_to_subscribed_fasp
|
def announce_updated_content_to_subscribed_fasp
|
||||||
return unless account_indexable?
|
return unless account_indexable? && public_visibility_or_just_changed?
|
||||||
|
|
||||||
Fasp::AnnounceContentLifecycleEventWorker.perform_async(uri, 'update')
|
Fasp::AnnounceContentLifecycleEventWorker.perform_async(uri, 'update')
|
||||||
end
|
end
|
||||||
|
|
||||||
def announce_deleted_content_to_subscribed_fasp
|
def announce_deleted_content_to_subscribed_fasp
|
||||||
return unless account_indexable?
|
return unless account_indexable? && public_visibility?
|
||||||
|
|
||||||
Fasp::AnnounceContentLifecycleEventWorker.perform_async(uri, 'delete')
|
Fasp::AnnounceContentLifecycleEventWorker.perform_async(uri, 'delete')
|
||||||
end
|
end
|
||||||
@ -42,4 +42,8 @@ module Status::FaspConcern
|
|||||||
end
|
end
|
||||||
Fasp::AnnounceTrendWorker.perform_async(candidate_id, trend_source) if candidate_id
|
Fasp::AnnounceTrendWorker.perform_async(candidate_id, trend_source) if candidate_id
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def public_visibility_or_just_changed?
|
||||||
|
public_visibility? || visibility_previously_was == 'public'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user