diff options
author | 2021-05-15 11:58:11 +0200 | |
---|---|---|
committer | 2021-05-15 11:58:11 +0200 | |
commit | cc48294c31a76e94fa879ad0d8d5dbd7e94c651b (patch) | |
tree | 7c26d33b41bab33bbdfbba540958444f4c296602 /internal/federation/federatingactor.go | |
parent | Mediahandler (#21) (diff) | |
download | gotosocial-cc48294c31a76e94fa879ad0d8d5dbd7e94c651b.tar.xz |
Inbox post (#22)
Inbox POST from federated servers now working for statuses and follow requests.
Follow request client API added.
Start work on federating outgoing messages.
Other fixes and changes/tidying up.
Diffstat (limited to 'internal/federation/federatingactor.go')
-rw-r--r-- | internal/federation/federatingactor.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/internal/federation/federatingactor.go b/internal/federation/federatingactor.go index f105d9125..65a16efaf 100644 --- a/internal/federation/federatingactor.go +++ b/internal/federation/federatingactor.go @@ -77,6 +77,13 @@ func (f *federatingActor) PostInbox(c context.Context, w http.ResponseWriter, r return f.actor.PostInbox(c, w, r) } +// PostInboxScheme is similar to PostInbox, except clients are able to +// specify which protocol scheme to handle the incoming request and the +// data stored within the application (HTTP, HTTPS, etc). +func (f *federatingActor) PostInboxScheme(c context.Context, w http.ResponseWriter, r *http.Request, scheme string) (bool, error) { + return f.actor.PostInboxScheme(c, w, r, scheme) +} + // GetInbox returns true if the request was handled as an ActivityPub // GET to an actor's inbox. If false, the request was not an ActivityPub // request and may still be handled by the caller in another way, such @@ -118,6 +125,13 @@ func (f *federatingActor) PostOutbox(c context.Context, w http.ResponseWriter, r return f.actor.PostOutbox(c, w, r) } +// PostOutboxScheme is similar to PostOutbox, except clients are able to +// specify which protocol scheme to handle the incoming request and the +// data stored within the application (HTTP, HTTPS, etc). +func (f *federatingActor) PostOutboxScheme(c context.Context, w http.ResponseWriter, r *http.Request, scheme string) (bool, error) { + return f.actor.PostOutboxScheme(c, w, r, scheme) +} + // GetOutbox returns true if the request was handled as an ActivityPub // GET to an actor's outbox. If false, the request was not an // ActivityPub request. |