Allow receiving private self-announces over ActivityPub
Built on top of #893 (closed), this PR allows receiving self-announces of private objects provided the announce does not widen the audience (“Boost to original audience” in Mastodon) over ActivityPub.
It also changes the API to allow users to announce objects privately, as in Mastodon (although I do not know of a client allowing that) and announcing their own private notes.
For it to work, the PR also makes the following changes:
- In the Mastodon API, instead of always being assumed public, announcements will be returned with the visibility of the
Announce
activity itself - Private announcements are now added to the announced object's
data['announcements']
, and the announcements themselves are filtered (one additional database query) before being shown in/api/v1/statuses/:id/reblogged_by
. There did not seem to be any other place listing the announcements, but I may have missed them
Edited by Claire