Fix mstdn cmd pagination
parent
22f47735b4
commit
1c0e37928e
|
@ -20,8 +20,8 @@ func cmdFollowers(c *cli.Context) error {
|
||||||
var maxID *int64
|
var maxID *int64
|
||||||
var followers []*mastodon.Account
|
var followers []*mastodon.Account
|
||||||
for {
|
for {
|
||||||
fs, pg, err := client.GetAccountFollowers(
|
pg := mastodon.Pagination{MaxID: maxID}
|
||||||
context.Background(), account.ID, &mastodon.Pagination{MaxID: maxID})
|
fs, err := client.GetAccountFollowers(context.Background(), account.ID, &pg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ import (
|
||||||
|
|
||||||
func cmdNotification(c *cli.Context) error {
|
func cmdNotification(c *cli.Context) error {
|
||||||
client := c.App.Metadata["client"].(*mastodon.Client)
|
client := c.App.Metadata["client"].(*mastodon.Client)
|
||||||
notifications, _, err := client.GetNotifications(context.Background(), nil)
|
notifications, err := client.GetNotifications(context.Background(), nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@ import (
|
||||||
func cmdTimeline(c *cli.Context) error {
|
func cmdTimeline(c *cli.Context) error {
|
||||||
client := c.App.Metadata["client"].(*mastodon.Client)
|
client := c.App.Metadata["client"].(*mastodon.Client)
|
||||||
config := c.App.Metadata["config"].(*mastodon.Config)
|
config := c.App.Metadata["config"].(*mastodon.Config)
|
||||||
timeline, _, err := client.GetTimelineHome(context.Background(), nil)
|
timeline, err := client.GetTimelineHome(context.Background(), nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue