#31 Adding post and comment ap_id columns.

Closed
dessalines wants to merge 0 commits from federation_add_fed_columns into federation
Owner
There is no content yet.
dessalines reviewed 11 months ago
server/src/apub/mod.rs Outdated
EndpointType::Community => "community",
EndpointType::User => "user",
EndpointType::Post => "post",
EndpointType::Comment => "comment",
dessalines commented 11 months ago

@nutomic I changed these to their full names, they're urls so no reason to not be explicit, and /c/ could be either a community or a comment.

@nutomic I changed these to their full names, they're urls so no reason to not be explicit, and /c/ could be either a community or a comment.
nutomic commented 11 months ago

Not gonna work, you would have to change them in routes/federation.rs as well. Anyway I think we will have to change the URLs so that they are the same for html and activity+json content types, so that you can simply copy the URL into the Masto search and have it fetch the object.

Not gonna work, you would have to change them in routes/federation.rs as well. Anyway I think we will have to change the URLs so that they are the same for html and activity+json content types, so that you can simply copy the URL into the Masto search and have it fetch the object.
nutomic commented 11 months ago

Gonna revert this for now, anyway we are not federating comments yet.

Gonna revert this for now, anyway we are not federating comments yet.
dessalines reviewed 11 months ago
))
.get_result::<Self>(conn)
}
}
dessalines commented 11 months ago

Added some helper DB methods.

Added some helper DB methods.
nutomic commented 11 months ago

Could you explain how you imagine this to work with federation?

Could you explain how you imagine this to work with federation?
dessalines commented 11 months ago

Activitypub calls deletes "tombstones" I think, and it'll have to post that to all its recipients.

Activitypub calls deletes "tombstones" I think, and it'll have to post that to all its recipients.
nutomic commented 11 months ago

Ah okay, thats still far away. And the update_ap_id() method is for db migrations or on comment creation then, I see.

Ah okay, thats still far away. And the update_ap_id() method is for db migrations or on comment creation then, I see.
dessalines reviewed 11 months ago
diesel::update(post.find(post_id))
.set(ap_id.eq(apid))
.get_result::<Self>(conn)
}
dessalines commented 11 months ago

Necessary since the post ap_id comes from the row id.

Necessary since the post ap_id comes from the row id.
nutomic commented 11 months ago

Necessary in what case?

Necessary in what case?
dessalines commented 11 months ago

You mean why a post needs an activitypub id? Our instance might have local posts, or federated ones. The local ones can use this helper method, the federated ones that we receive will have their external ones here.

You mean why a post needs an activitypub id? Our instance might have local posts, or federated ones. The local ones can use this helper method, the federated ones that we receive will have their external ones here.
nutomic closed this pull request 11 months ago
nutomic reopened this pull request 11 months ago
Poster
Owner

Okay merged.

Okay merged.
nutomic closed this pull request 11 months ago
This pull request cannot be reopened because the branch was deleted.
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This pull request currently doesn't have any dependencies.

Loading…
There is no content yet.