summaryrefslogtreecommitdiff
path: root/internal/message/fediprocess.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/message/fediprocess.go')
-rw-r--r--internal/message/fediprocess.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/internal/message/fediprocess.go b/internal/message/fediprocess.go
index dad1e848c..133e7dbaa 100644
--- a/internal/message/fediprocess.go
+++ b/internal/message/fediprocess.go
@@ -1,6 +1,7 @@
package message
import (
+ "context"
"fmt"
"net/http"
@@ -8,6 +9,7 @@ import (
apimodel "github.com/superseriousbusiness/gotosocial/internal/api/model"
"github.com/superseriousbusiness/gotosocial/internal/db"
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
+ "github.com/superseriousbusiness/gotosocial/internal/util"
)
// authenticateAndDereferenceFediRequest authenticates the HTTP signature of an incoming federation request, using the given
@@ -130,3 +132,9 @@ func (p *processor) GetWebfingerAccount(requestedUsername string, request *http.
},
}, nil
}
+
+func (p *processor) InboxPost(ctx context.Context, w http.ResponseWriter, r *http.Request) (bool, error) {
+ contextWithChannel := context.WithValue(ctx, util.APFromFederatorChanKey, p.fromFederator)
+ posted, err := p.federator.FederatingActor().PostInbox(contextWithChannel, w, r)
+ return posted, err
+}