From 4b1d9d3780134098ff06877abc20c970c32d4aac Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Sun, 24 Oct 2021 11:57:39 +0200 Subject: Serve `outbox` for Actor (#289) * add statusesvisible convenience function * add minID + onlyPublic to account statuses get * move swagger collection stuff to common * start working on Outbox GETting * move functions into federationProcessor * outboxToASCollection * add statusesvisible convenience function * add minID + onlyPublic to account statuses get * move swagger collection stuff to common * start working on Outbox GETting * move functions into federationProcessor * outboxToASCollection * bit more work on outbox paging * wrapNoteInCreate function * test + hook up the processor functions * don't do prev + next links on empty reply * test get outbox through api * don't fail on no status entries * add outbox implementation doc * typo --- internal/api/s2s/user/user.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'internal/api/s2s/user/user.go') diff --git a/internal/api/s2s/user/user.go b/internal/api/s2s/user/user.go index ef0057f98..56b940f1d 100644 --- a/internal/api/s2s/user/user.go +++ b/internal/api/s2s/user/user.go @@ -37,6 +37,8 @@ const ( OnlyOtherAccountsKey = "only_other_accounts" // MinIDKey is for filtering status responses. MinIDKey = "min_id" + // MaxIDKey is for filtering status responses. + MaxIDKey = "max_id" // PageKey is for filtering status responses. PageKey = "page" @@ -50,6 +52,8 @@ const ( UsersPublicKeyPath = UsersBasePathWithUsername + "/" + util.PublicKeyPath // UsersInboxPath is for serving POST requests to a user's inbox with the given username key. UsersInboxPath = UsersBasePathWithUsername + "/" + util.InboxPath + // UsersOutboxPath is for serving GET requests to a user's outbox with the given username key. + UsersOutboxPath = UsersBasePathWithUsername + "/" + util.OutboxPath // UsersFollowersPath is for serving GET request's to a user's followers list, with the given username key. UsersFollowersPath = UsersBasePathWithUsername + "/" + util.FollowersPath // UsersFollowingPath is for serving GET request's to a user's following list, with the given username key. @@ -83,5 +87,6 @@ func (m *Module) Route(s router.Router) error { s.AttachHandler(http.MethodGet, UsersStatusPath, m.StatusGETHandler) s.AttachHandler(http.MethodGet, UsersPublicKeyPath, m.PublicKeyGETHandler) s.AttachHandler(http.MethodGet, UsersStatusRepliesPath, m.StatusRepliesGETHandler) + s.AttachHandler(http.MethodGet, UsersOutboxPath, m.OutboxGETHandler) return nil } -- cgit v1.2.3