From 1c0e37928e581ceff697e88a1caf250b6951925a Mon Sep 17 00:00:00 2001 From: 178inaba <178inaba@users.noreply.github.com> Date: Sat, 6 May 2017 23:49:46 +0900 Subject: [PATCH] Fix mstdn cmd pagination --- cmd/mstdn/cmd_followers.go | 4 ++-- cmd/mstdn/cmd_notification.go | 2 +- cmd/mstdn/cmd_timeline.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/mstdn/cmd_followers.go b/cmd/mstdn/cmd_followers.go index 4c21e8d..d505137 100644 --- a/cmd/mstdn/cmd_followers.go +++ b/cmd/mstdn/cmd_followers.go @@ -20,8 +20,8 @@ func cmdFollowers(c *cli.Context) error { var maxID *int64 var followers []*mastodon.Account for { - fs, pg, err := client.GetAccountFollowers( - context.Background(), account.ID, &mastodon.Pagination{MaxID: maxID}) + pg := mastodon.Pagination{MaxID: maxID} + fs, err := client.GetAccountFollowers(context.Background(), account.ID, &pg) if err != nil { return err } diff --git a/cmd/mstdn/cmd_notification.go b/cmd/mstdn/cmd_notification.go index d96b0ce..b32ba4e 100644 --- a/cmd/mstdn/cmd_notification.go +++ b/cmd/mstdn/cmd_notification.go @@ -11,7 +11,7 @@ import ( func cmdNotification(c *cli.Context) error { client := c.App.Metadata["client"].(*mastodon.Client) - notifications, _, err := client.GetNotifications(context.Background(), nil) + notifications, err := client.GetNotifications(context.Background(), nil) if err != nil { return err } diff --git a/cmd/mstdn/cmd_timeline.go b/cmd/mstdn/cmd_timeline.go index 4024826..d9a0024 100644 --- a/cmd/mstdn/cmd_timeline.go +++ b/cmd/mstdn/cmd_timeline.go @@ -10,7 +10,7 @@ import ( func cmdTimeline(c *cli.Context) error { client := c.App.Metadata["client"].(*mastodon.Client) config := c.App.Metadata["config"].(*mastodon.Config) - timeline, _, err := client.GetTimelineHome(context.Background(), nil) + timeline, err := client.GetTimelineHome(context.Background(), nil) if err != nil { return err }