Skip to content

Conversation

@ghost
Copy link

@ghost ghost commented Mar 18, 2022

This implements a few components of the ActivityPub protocol using the go-ap library. This includes an /activitypub and /activitypub/user endpoint for the API, ActivityPub-specific information in the /.well-known/webfinger endpoint, and middleware for HTTP signatures. It does not do much but it is an essential building block for ActivityPub federation.


Loïc Dachary added 7 commits March 18, 2022 17:33
go get github.com/go-fed/activity/streams@master
go get github.com/go-fed/activity/pub@master
go get github.com/go-fed/httpsig@master
Return informations regarding a Person (as defined in ActivityStreams
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-person).

Refs: #14186

Signed-off-by: Loïc Dachary <[email protected]>
Signed-off-by: Loïc Dachary <[email protected]>
Signed-off-by: Loïc Dachary <[email protected]>
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Mar 19, 2022
@lunny lunny added type/feature Completely new functionality. Can only be merged if feature freeze is not active. topic/federation labels Mar 19, 2022
@Gusted Gusted added this to the 1.17.0 milestone Mar 19, 2022
@ghost ghost requested a review from Gusted March 21, 2022 02:41
Copy link
Contributor

@Gusted Gusted left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looking good. Code flow looks good to me, we might want to add some more comments here and there because I'm still scratching my head at some sections of the code, of what's actually doing.

@ghost
Copy link
Author

ghost commented Mar 24, 2022

This PR adds the large go-fed library which increases the Gitea binary size from 80 MB to 103 MB. I originally created #19104 to discuss ways to deal with this addition, but we can also discuss it here.

@Gusted
Copy link
Contributor

Gusted commented Mar 25, 2022

This PR adds the large go-fed library which increases the Gitea binary size from 80 MB to 103 MB. I originally created #19104 to discuss ways to deal with this addition, but we can also discuss it here.

That's measurably bigger. Of course it would be nice if go-fed was able to simplify code to reduce the binary size. Possible solution, given the nature of this is to introduce build tags within gitea, such that go-fed won't compile if one doesn't want to use federation.

@ghost ghost requested a review from Gusted March 26, 2022 01:50
Copy link
Member

@6543 6543 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

at least add it ...

@ghost
Copy link
Author

ghost commented Jun 18, 2022

Sorry for the force-push: I think it's because https://github.com/Ta180m/gitea is a push mirror of https://gitea.com/Ta180m/gitea and a commit on the GitHub repo was overwritten when gitea.com synchronized the mirror.

@6543
Copy link
Member

6543 commented Jun 18, 2022

to bad ... I was just going to merge this ...

@ghost
Copy link
Author

ghost commented Jun 18, 2022

Sorry for the force-push: I think it's because https://github.com/Ta180m/gitea is a push mirror of https://gitea.com/Ta180m/gitea and a commit on the GitHub repo was overwritten when gitea.com synchronized the mirror.

@6543 I don't think there was anything important overwritten so it should be OK to merge now.

Copy link
Member

@delvh delvh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only skimmed through it because it seems to get merged soon, but I found a few things:

// NewClient function
func NewClient(user *user_model.User, pubID string) (c *Client, err error) {
if err = containsRequiredHTTPHeaders(http.MethodGet, setting.Federation.GetHeaders); err != nil {
return
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that there is currently a PR that attempts to get rid of naked returns, I think you should convert them.
Everywhere you added them.

@6543
Copy link
Member

6543 commented Jun 19, 2022

🚀

@6543 6543 merged commit e86f18a into go-gitea:main Jun 19, 2022
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Dec 16, 2022
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. lgtm/need 1 This PR needs approval from one additional maintainer to be merged. topic/federation type/feature Completely new functionality. Can only be merged if feature freeze is not active.

Projects

None yet

Development

Successfully merging this pull request may close these issues.