aboutsummaryrefslogtreecommitdiff
path: root/service/service.go
diff options
context:
space:
mode:
authorr <r@freesoftwareextremist.com>2020-09-27 09:50:04 +0000
committerr <r@freesoftwareextremist.com>2020-09-27 09:50:04 +0000
commit59692b715578cf02b8f01eda4692858ad922670e (patch)
tree243088fcb87e7cd988b752af66d72bb87945045c /service/service.go
parent0df863ac4031e26e3cb64779618e0733d9686fc0 (diff)
downloadbloat-59692b715578cf02b8f01eda4692858ad922670e.tar.gz
bloat-59692b715578cf02b8f01eda4692858ad922670e.zip
Add blocks list
Diffstat (limited to 'service/service.go')
-rw-r--r--service/service.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/service/service.go b/service/service.go
index f268e30..0b23d47 100644
--- a/service/service.go
+++ b/service/service.go
@@ -529,6 +529,18 @@ func (svc *service) ServeUserPage(c *model.Client, id string, pageType string,
nextLink = fmt.Sprintf("/user/%s/mutes?max_id=%s",
id, pg.MaxID)
}
+ case "blocks":
+ if !isCurrent {
+ return errInvalidArgument
+ }
+ users, err = c.GetBlocks(ctx, &pg)
+ if err != nil {
+ return
+ }
+ if len(users) == 20 && len(pg.MaxID) > 0 {
+ nextLink = fmt.Sprintf("/user/%s/blocks?max_id=%s",
+ id, pg.MaxID)
+ }
default:
return errInvalidArgument
}