Add shared inbox support for ActivityPub delivery (#4755)
* feat(ap): add support for shared inboxes to reduce outbound load * feat(db): refactor ap followers db into followers repository * fix(ap): use the updated activity library to pull out the shared inbox endpoint * chore(deps): point at updated build of owncast/activity * fix(ap): typeless endpoints * feat(test): update ActivityPub test to support shared inboxes * chore(test): remove unused variable * fix: feedback from review. Guard against SSRF/non-HTTPS/local and handle transaction errors
This commit is contained in:
@@ -3,13 +3,14 @@ package handlers
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/owncast/owncast/activitypub/persistence"
|
||||
"github.com/owncast/owncast/activitypub/persistence/followersrepository"
|
||||
webutils "github.com/owncast/owncast/webserver/utils"
|
||||
)
|
||||
|
||||
// GetFollowers will handle an API request to fetch the list of followers (non-activitypub response).
|
||||
func GetFollowers(offset int, limit int, w http.ResponseWriter, r *http.Request) {
|
||||
followers, total, err := persistence.GetFederationFollowers(limit, offset)
|
||||
followersRepo := followersrepository.Get()
|
||||
followers, total, err := followersRepo.GetFollowers(limit, offset)
|
||||
if err != nil {
|
||||
webutils.WriteSimpleResponse(w, false, "unable to fetch followers")
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user