diff options
author | 2021-05-29 19:39:43 +0200 | |
---|---|---|
committer | 2021-05-29 19:39:43 +0200 | |
commit | 1fe5e36ac3a631a53724fe99583b7f11baa32c53 (patch) | |
tree | 40ae75c3613c9c6915273f98fe7ce41046d11381 /internal/federation/commonbehavior.go | |
parent | federate account updates (diff) | |
download | gotosocial-1fe5e36ac3a631a53724fe99583b7f11baa32c53.tar.xz |
Search (#36)
First implementation of search functionality for remote account and status lookups.
Diffstat (limited to 'internal/federation/commonbehavior.go')
-rw-r--r-- | internal/federation/commonbehavior.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/internal/federation/commonbehavior.go b/internal/federation/commonbehavior.go index 8ed6fd2cb..fab9ce112 100644 --- a/internal/federation/commonbehavior.go +++ b/internal/federation/commonbehavior.go @@ -25,6 +25,7 @@ import ( "net/url" "github.com/go-fed/activity/pub" + "github.com/go-fed/activity/streams" "github.com/go-fed/activity/streams/vocab" "github.com/superseriousbusiness/gotosocial/internal/gtsmodel" "github.com/superseriousbusiness/gotosocial/internal/util" @@ -59,7 +60,7 @@ import ( func (f *federator) AuthenticateGetInbox(ctx context.Context, w http.ResponseWriter, r *http.Request) (context.Context, bool, error) { // IMPLEMENTATION NOTE: For GoToSocial, we serve GETS to outboxes and inboxes through // the CLIENT API, not through the federation API, so we just do nothing here. - return nil, false, nil + return ctx, false, nil } // AuthenticateGetOutbox delegates the authentication of a GET to an @@ -84,7 +85,7 @@ func (f *federator) AuthenticateGetInbox(ctx context.Context, w http.ResponseWri func (f *federator) AuthenticateGetOutbox(ctx context.Context, w http.ResponseWriter, r *http.Request) (context.Context, bool, error) { // IMPLEMENTATION NOTE: For GoToSocial, we serve GETS to outboxes and inboxes through // the CLIENT API, not through the federation API, so we just do nothing here. - return nil, false, nil + return ctx, false, nil } // GetOutbox returns the OrderedCollection inbox of the actor for this @@ -98,7 +99,7 @@ func (f *federator) AuthenticateGetOutbox(ctx context.Context, w http.ResponseWr func (f *federator) GetOutbox(ctx context.Context, r *http.Request) (vocab.ActivityStreamsOrderedCollectionPage, error) { // IMPLEMENTATION NOTE: For GoToSocial, we serve GETS to outboxes and inboxes through // the CLIENT API, not through the federation API, so we just do nothing here. - return nil, nil + return streams.NewActivityStreamsOrderedCollectionPage(), nil } // NewTransport returns a new Transport on behalf of a specific actor. |