From ac342dde079a0ca156c36a402a3c0ba86d78821d Mon Sep 17 00:00:00 2001 From: r Date: Sat, 23 Jan 2021 08:44:05 +0000 Subject: Add remote timeline --- mastodon/status.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'mastodon') diff --git a/mastodon/status.go b/mastodon/status.go index c8555d6..80e7e0e 100644 --- a/mastodon/status.go +++ b/mastodon/status.go @@ -191,9 +191,11 @@ func (c *Client) GetTimelineHome(ctx context.Context, pg *Pagination) ([]*Status } // GetTimelinePublic return statuses from public timeline. -func (c *Client) GetTimelinePublic(ctx context.Context, isLocal bool, pg *Pagination) ([]*Status, error) { +func (c *Client) GetTimelinePublic(ctx context.Context, isLocal bool, instance string, pg *Pagination) ([]*Status, error) { params := url.Values{} - if isLocal { + if len(instance) > 0 { + params.Set("instance", instance) + } else if isLocal { params.Set("local", "true") } -- cgit v1.2.3