New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add REST API for managing and posting to circles #14354
Conversation
Circles are the conceptual opposite of lists. A list is a subdivision of your follows, a circle is a subdivision of your followers. Posting to a circle means making content available to only some of your followers. Circles have been internally supported in Mastodon for the purposes of federation since #8950, this adds the REST API necessary for making use of them in Mastodon itsef.
to avoid confusion, can they be called "audiences"? |
I won't deny that both "circles" (popularized by Google Plus) and "aspects" (popularized by Diaspora) are not self-explanatory terms, so an alternative might be necessary. On the other hand, they did get popularized already (to some extent). I'm not a native English speaker but "audiences" sounds odd to me when pluralized. Perhaps something with more words would be easier to understand? Follower group? Follower bracket? Borrowing from Patreon, follower tier? Audience tier? (That one might get confused with public/unlisted/private/etc though) |
"Create an audience" and "Post to this audience" sound clear to me in English. "Audiences" doesn't sound weird to me as a native English speaker. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, that's something I've been wanting to implement for a while but couldn't get what your stand on this was, but also I have a few other concerns with.
In addition to the few remarks (including one which I think points to a bug), I have a few concerns:
- performances: storage-wise and federation-wise, posting a toot to a circle is functionally equivalent to writing a DM mentioning each of the circle's users, so i'm afraid this could be expensive with large circles
- UX: clients will see such messages as followers-only, not knowing they were intended for a subset of the followers, which may or may not be fine (e.g. you don't necessarily want recipients to know which circles they are part of; but on the other hand, as a poster you may want to know who you have posted a toot to)
- downgrade through reply: an extension of the issue above is that, since each client sees the toot as a followers-only toot, any reply to it will be sent as followers-only, effectively downgrading the privacy of the thread. This is similar to the issue we have with followers-only, except this time even a self-reply or a round-trip is, by default, a downgrade.
- compatibility with Pleroma: I think a while ago, Pleroma started implementing something similar. I think it worked in much the same way, but repurposed lists instead, and had special visibility to
list:id
instead of a newcircle
attribute - API: which makes me think of, the circle being an extra parameter plays weridly with visibility scopes. furthermore, this doesn't seem to be part of the reblog endpoints either
def set_follow | ||
self.follow = Follow.find_by!(target_account_id: circle.account_id, account_id: account.id) | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the purpose of this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If follow is deleted, this record will also be deleted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh right, it's not null
and on_delete: cascade
in the SQL… though… why is it marked as optional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm... maybe that’s a mistake.
@@ -67,7 +70,7 @@ def process_status! | |||
end | |||
|
|||
process_hashtags_service.call(@status) | |||
process_mentions_service.call(@status) | |||
process_mentions_service.call(@status, @circle) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is slightly awkward, at first I thought this didn't make sense, but given that we're implementing that through “silent mentions”… i guess this does make sense.
if circle.present? | ||
circle.accounts.find_each do |target_account| | ||
status.mentions.create(silent: true, account: target_account) | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Won't this fail if someone from the circle is also explicitly mentioned? Because of the uniqueness constraint to mentions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because it is not added to the mentions, it will not be create_notification().
mention = target_account.mentions.new(status: status, silent: true)
mentions << mention if mention.save
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True. In addition, create_notification
is kind of a misnomer because it handles both notifications and AP federation. In this case we probably do not want notifications (unless explicit mention), but we want to federate through AP.
CIrcleSerializer is missing. b83e87a655aa5907ad9d076fac1da9fcf9c37c99 |
After thinking for a while, I put together my thoughts. Mastodon, which does not support reply to limited visibility, has no choice but to allow downgrade to private. Pleroma recognizes it as direct visibility. I think it is possible to build a mechanism to forward and redistribute a reply tree to limited status in Mastodon in the future, but it is a little complicated and it is difficult to make it compatible with Fediverse. In that case, I think it is correct to handle the reply to limited status as direct visibility in Composer of WebUI and move to DM. We changed the API to report limited visibility to clients as direct, and the limited flag compensates for this. Unlike direct, it will deliver to the home timeline instead of conversations. In summary, the circle feature can deliver messages and content to a wider area than DM without revealing the destination. And you can receive the reaction directly by DM. It will be useful because it has different conveniences from DM. On the other hand, the mechanism for sharing the member list and posting to all members can be covered by the group feature centered on the Group Actor. Group features and circle features are similar, but we should use them properly. For circles, design decisions should be made about what to do and what not to do. I think keeping each function simple will be more widely accepted and used. |
Yeah, I basically see two ways to move forward with circles:
|
The circle_id is not recorded in the status, so the circle cannot be reselected during redraft or self reply. |
Circle.title is only used visually, but I think it should be unique for identification purposes. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Un-stale it, bot. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Circles are the conceptual opposite of lists. A list is a subdivision of your follows, a circle is a subdivision of your followers. Posting
to a circle means making content available to only some of your followers. Circles have been internally supported in Mastodon for
the purposes of federation since #8950, this adds the REST API necessary for making use of them in Mastodon itsef.
Side note: Regardless of whether or not #12385 will ever be implemented, this is a prerequisite for that kind of system. Technically people could manually manage paid tiers of content this way already...