summaryrefslogtreecommitdiff
path: root/internal/processing/list/create.go
diff options
context:
space:
mode:
authorLibravatar Vyr Cossont <VyrCossont@users.noreply.github.com>2024-09-09 15:56:58 -0700
committerLibravatar GitHub <noreply@github.com>2024-09-09 15:56:58 -0700
commit540edef0c20dad4ea13d8af091ccf69796b848b6 (patch)
treed53106b4170f571a4472e60d35f9b7e2445269d4 /internal/processing/list/create.go
parent[feature/frontend] Add options to include Unlisted posts or hide all posts (#... (diff)
downloadgotosocial-540edef0c20dad4ea13d8af091ccf69796b848b6.tar.xz
[feature] Implement exclusive lists (#3280)
Fixes #2616
Diffstat (limited to 'internal/processing/list/create.go')
-rw-r--r--internal/processing/list/create.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/internal/processing/list/create.go b/internal/processing/list/create.go
index 10dec1050..dacd7909f 100644
--- a/internal/processing/list/create.go
+++ b/internal/processing/list/create.go
@@ -30,12 +30,19 @@ import (
// Create creates one a new list for the given account, using the provided parameters.
// These params should have already been validated by the time they reach this function.
-func (p *Processor) Create(ctx context.Context, account *gtsmodel.Account, title string, repliesPolicy gtsmodel.RepliesPolicy) (*apimodel.List, gtserror.WithCode) {
+func (p *Processor) Create(
+ ctx context.Context,
+ account *gtsmodel.Account,
+ title string,
+ repliesPolicy gtsmodel.RepliesPolicy,
+ exclusive bool,
+) (*apimodel.List, gtserror.WithCode) {
list := &gtsmodel.List{
ID: id.NewULID(),
Title: title,
AccountID: account.ID,
RepliesPolicy: repliesPolicy,
+ Exclusive: &exclusive,
}
if err := p.state.DB.PutList(ctx, list); err != nil {