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
Do announce for all actions posted to a community. #662
Comments
Do we really want to make community followers public? That was implemented before, but I removed it because it seems like a privacy problem. And more importantly its not needed, because the only actor that directly addresses the community followers is the community itself. |
So in fact all you need to do when sending out a community post is query the followers of that community from the database, and selecting the inbox/sharedinbox. The only reason you would need network calls for that is if the actors need to be refreshed. |
I'm seeing this in some of the docs:
So for example, in building the inboxes, if I query the
And since its public, I need to dedupe these to just
I'll also add something like:
|
It's best you don't try to generate URLs for foreign domains. Am actor will tell you were it's shared inbox is, if it's server supports shared inboxes. |
Right now at least, we're only storing the actor_id in the DB row for that user and community I'm looking at pleromas user table right now, and the only url fields they store are I'm not sure which DB columns I should add if any, I'd originally thought these would all conform to the standard of edit: Ahh looks like they recently added it: https://git.pleroma.social/pleroma/pleroma/-/blob/develop/priv/repo/migrations/20200401072456_users_add_inboxes.exs I think as part of this then, I'll do a migration to at least add those 4 columns. |
@asonix Do you know of a good list of actor_urls I should be storing in the DB for each user? |
We could also leave those DB columns for later, seeing as we are only federating between Lemmy instances for now. |
Okay I realized we're doing something kind of wrong with sending activitypub messages. Here's my problem:
This paragraph seems to say that wherever the actor lives, it acts as a sort of "forwarding server", that forwards messages to everyone subscribed to it. So A and C only send to https://www.w3.org/TR/activitypub/#delivery So we need to alter lemmy to make sure that the actor's server is forwarding that message to all non-local servers, except the one where the message came from. |
Right, this is why the community needs to announce the post. I kind of forgot about this issue, but its definitely more important than the comment fetching, so I will work on this next. |
I don't think its an announce, but really just forwarding that create to the correct other recipients, when it receives it in its shared inbox where the actor really lives. Its the same thing with mastodon, there's a users followers, that the sender doesn't really know about, it just sends it to |
I think it's general mastodon practice to use "Announce" even when creating new posts. the "Create" activity, in mastodon's view, isn't important. Servers Announce new posts to each other all the time. Knowing this, in my view, Create is a client2server activity to tell the server to create a resource, and Announce is how the server tells other servers about the created resource. |
I think announce is "boosting / sharing" : https://www.w3.org/TR/activitypub/#announce-activity-inbox. In the case of communities, we're just talking about making sure things are pushed to all the community's followers. I think the difference here, is with masto, when you make a post, it goes to your followers, which your instance already has. But with federated communities, you might be posting to a community that lives elsewhere, and only it knows all of its followers. |
That makes sense. So you send the Create activity to the server hosting the community, and that server then Announces the new post/comment to it's members. That's interesting, because it will mean that posts and comments really do "live" on the server hosting the community, and not necessarily the server the user is connected to. |
I started to implement this, although its not working yet. https://yerbamate.dev/LemmyNet/lemmy/pulls/36 https://yerbamate.dev/LemmyNet/lemmy/commit/514bceb331878684f59c9b6256855e11d3062418 |
Object creates should look like:
And followers looks like:
and first looking like
Or, from activitypub:
This involves building both a
followers
paged collection, and a buildToListWe need to build a
buildToList
method, which:"endpoints":{"sharedInbox":"https://mastodon.social/inbox"}
The text was updated successfully, but these errors were encountered: