summaryrefslogtreecommitdiff
path: root/internal/processing/processor.go
diff options
context:
space:
mode:
authorLibravatar Matthew Phillips <matthew@matthewphillips.info>2022-12-09 05:37:12 -0500
committerLibravatar GitHub <noreply@github.com>2022-12-09 11:37:12 +0100
commit477ae50933ab7447757752ec35bf898db287acff (patch)
tree28750a1aea3cda180ca1461cfad7ea130c22bba1 /internal/processing/processor.go
parent[chore] move caches to a separate State{} structure (#1078) (diff)
downloadgotosocial-477ae50933ab7447757752ec35bf898db287acff.tar.xz
[feature] Allow users to create + delete bookbarks, and view bookmarked statuses (#1168)
* Implement Bookmarks * Update based on review comments * Update swagger doc * Fix argument passing to status.Bookmark * Update changed test * Updates based on latest PR review
Diffstat (limited to 'internal/processing/processor.go')
-rw-r--r--internal/processing/processor.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/internal/processing/processor.go b/internal/processing/processor.go
index 22fb7b2b7..88b0f5594 100644
--- a/internal/processing/processor.go
+++ b/internal/processing/processor.go
@@ -146,6 +146,9 @@ type Processor interface {
// CustomEmojisGet returns an array of info about the custom emojis on this server
CustomEmojisGet(ctx context.Context) ([]*apimodel.Emoji, gtserror.WithCode)
+ // BookmarksGet returns a pageable response of statuses that have been bookmarked
+ BookmarksGet(ctx context.Context, authed *oauth.Auth, maxID string, minID string, limit int) (*apimodel.PageableResponse, gtserror.WithCode)
+
// FileGet handles the fetching of a media attachment file via the fileserver.
FileGet(ctx context.Context, authed *oauth.Auth, form *apimodel.GetContentRequestForm) (*apimodel.Content, gtserror.WithCode)
@@ -202,6 +205,10 @@ type Processor interface {
StatusUnfave(ctx context.Context, authed *oauth.Auth, targetStatusID string) (*apimodel.Status, gtserror.WithCode)
// StatusGetContext returns the context (previous and following posts) from the given status ID
StatusGetContext(ctx context.Context, authed *oauth.Auth, targetStatusID string) (*apimodel.Context, gtserror.WithCode)
+ // StatusBookmark process a bookmark for a status
+ StatusBookmark(ctx context.Context, authed *oauth.Auth, targetStatusID string) (*apimodel.Status, gtserror.WithCode)
+ // StatusUnbookmark removes a bookmark for a status
+ StatusUnbookmark(ctx context.Context, authed *oauth.Auth, targetStatusID string) (*apimodel.Status, gtserror.WithCode)
// HomeTimelineGet returns statuses from the home timeline, with the given filters/parameters.
HomeTimelineGet(ctx context.Context, authed *oauth.Auth, maxID string, sinceID string, minID string, limit int, local bool) (*apimodel.PageableResponse, gtserror.WithCode)