diff options
author | 2021-08-10 13:32:39 +0200 | |
---|---|---|
committer | 2021-08-10 13:32:39 +0200 | |
commit | 0f2de6394a1c52d47e326bb7d7d129a217ae4f6f (patch) | |
tree | e2709bdbbbbcf5e12d6da62b653b67f1789ab1c5 /internal/api/s2s/user/user.go | |
parent | Frodo swaggins (#126) (diff) | |
download | gotosocial-0f2de6394a1c52d47e326bb7d7d129a217ae4f6f.tar.xz |
Dereference remote replies (#132)
* decided where to put reply dereferencing
* fiddling with dereferencing threads
* further adventures
* tidy up some stuff
* move dereferencing functionality
* a bunch of refactoring
* go fmt
* more refactoring
* bleep bloop
* docs and linting
* start implementing replies collection on gts side
* fiddling around
* allow dereferencing our replies
* lint, fmt
Diffstat (limited to 'internal/api/s2s/user/user.go')
-rw-r--r-- | internal/api/s2s/user/user.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/internal/api/s2s/user/user.go b/internal/api/s2s/user/user.go index 0cb8e1e90..b5ff9a699 100644 --- a/internal/api/s2s/user/user.go +++ b/internal/api/s2s/user/user.go @@ -34,6 +34,13 @@ const ( UsernameKey = "username" // StatusIDKey is for status IDs StatusIDKey = "status" + // OnlyOtherAccountsKey is for filtering status responses. + OnlyOtherAccountsKey = "only_other_accounts" + // MinIDKey is for filtering status responses. + MinIDKey = "min_id" + // PageKey is for filtering status responses. + PageKey = "page" + // UsersBasePath is the base path for serving information about Users eg https://example.org/users UsersBasePath = "/" + util.UsersPath // UsersBasePathWithUsername is just the users base path with the Username key in it. @@ -50,6 +57,8 @@ const ( UsersFollowingPath = UsersBasePathWithUsername + "/" + util.FollowingPath // UsersStatusPath is for serving GET requests to a particular status by a user, with the given username key and status ID UsersStatusPath = UsersBasePathWithUsername + "/" + util.StatusesPath + "/:" + StatusIDKey + // UsersStatusRepliesPath is for serving the replies collection of a status. + UsersStatusRepliesPath = UsersStatusPath + "/replies" ) // ActivityPubAcceptHeaders represents the Accept headers mentioned here: @@ -83,5 +92,6 @@ func (m *Module) Route(s router.Router) error { s.AttachHandler(http.MethodGet, UsersFollowingPath, m.FollowingGETHandler) s.AttachHandler(http.MethodGet, UsersStatusPath, m.StatusGETHandler) s.AttachHandler(http.MethodGet, UsersPublicKeyPath, m.PublicKeyGETHandler) + s.AttachHandler(http.MethodGet, UsersStatusRepliesPath, m.StatusRepliesGETHandler) return nil } |