From 24cec4e7aab33b6c44ba6d1ecf16895f254351b8 Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Wed, 1 Mar 2023 18:52:44 +0100 Subject: [feature] Federate pinned posts (aka `featuredCollection`) in and out (#1560) * start fiddling * the ol' fiddle + update * start working on fetching statuses * poopy doopy doo where r u uwu * further adventures in featuring statuses * finishing up * fmt * simply status unpin loop * move empty featured check back to caller function * remove unnecessary log.WithContext calls * remove unnecessary IsIRI() checks * add explanatory comment about status URIs * change log level to error * better test names --- internal/api/activitypub/users/user.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'internal/api/activitypub/users/user.go') diff --git a/internal/api/activitypub/users/user.go b/internal/api/activitypub/users/user.go index b31017866..c614435be 100644 --- a/internal/api/activitypub/users/user.go +++ b/internal/api/activitypub/users/user.go @@ -50,6 +50,8 @@ const ( FollowersPath = BasePath + "/" + uris.FollowersPath // FollowingPath is for serving GET request's to a user's following list, with the given username key. FollowingPath = BasePath + "/" + uris.FollowingPath + // FeaturedCollectionPath is for serving GET requests to a user's list of featured (pinned) statuses. + FeaturedCollectionPath = BasePath + "/" + uris.CollectionsPath + "/" + uris.FeaturedPath // StatusPath is for serving GET requests to a particular status by a user, with the given username key and status ID StatusPath = BasePath + "/" + uris.StatusesPath + "/:" + StatusIDKey // StatusRepliesPath is for serving the replies collection of a status. @@ -71,6 +73,7 @@ func (m *Module) Route(attachHandler func(method string, path string, f ...gin.H attachHandler(http.MethodPost, InboxPath, m.InboxPOSTHandler) attachHandler(http.MethodGet, FollowersPath, m.FollowersGETHandler) attachHandler(http.MethodGet, FollowingPath, m.FollowingGETHandler) + attachHandler(http.MethodGet, FeaturedCollectionPath, m.FeaturedCollectionGETHandler) attachHandler(http.MethodGet, StatusPath, m.StatusGETHandler) attachHandler(http.MethodGet, StatusRepliesPath, m.StatusRepliesGETHandler) attachHandler(http.MethodGet, OutboxPath, m.OutboxGETHandler) -- cgit v1.2.3