aboutsummaryrefslogtreecommitdiff
path: root/mastodon
diff options
context:
space:
mode:
authorr <r@freesoftwareextremist.com>2021-01-23 08:44:05 +0000
committerr <r@freesoftwareextremist.com>2021-01-23 08:44:05 +0000
commitac342dde079a0ca156c36a402a3c0ba86d78821d (patch)
tree03d3daf98c5e14736e9ba66f1781df83ea4eed65 /mastodon
parenteca0366c21c94f7cbf6d1b701dd31be8ee81abc7 (diff)
downloadbloat-ac342dde079a0ca156c36a402a3c0ba86d78821d.tar.gz
bloat-ac342dde079a0ca156c36a402a3c0ba86d78821d.zip
Add remote timeline
Diffstat (limited to 'mastodon')
-rw-r--r--mastodon/status.go6
1 files changed, 4 insertions, 2 deletions
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")
}