mirror of
https://git.phreedom.club/localhost_frssoft/bloat.git
synced 2024-11-29 07:01:28 +00:00
Compare commits
2 commits
679348d1f7
...
2bbcce5133
Author | SHA1 | Date | |
---|---|---|---|
localhost_frssoft | 2bbcce5133 | ||
localhost_frssoft | 62f653fc28 |
|
@ -258,7 +258,7 @@ func (c *Client) TrueRemoteTimeline(ctx context.Context, instance string, instan
|
||||||
var publicstatuses []*Status
|
var publicstatuses []*Status
|
||||||
var instanceParams []string
|
var instanceParams []string
|
||||||
instanceParams = strings.Split(instance, ":")[1:]
|
instanceParams = strings.Split(instance, ":")[1:]
|
||||||
instance = strings.Split(instance, ":")[0]
|
instance = strings.TrimSpace(strings.Split(instance, ":")[0])
|
||||||
params := url.Values{}
|
params := url.Values{}
|
||||||
params.Set("local", "true")
|
params.Set("local", "true")
|
||||||
|
|
||||||
|
@ -269,8 +269,8 @@ func (c *Client) TrueRemoteTimeline(ctx context.Context, instance string, instan
|
||||||
perform := url.URL{
|
perform := url.URL{
|
||||||
Scheme: "https",
|
Scheme: "https",
|
||||||
Host: instance,
|
Host: instance,
|
||||||
RawQuery: params.Encode(),
|
|
||||||
}
|
}
|
||||||
|
var paramval []string
|
||||||
withFiles := "false"
|
withFiles := "false"
|
||||||
withReplies := "false"
|
withReplies := "false"
|
||||||
globalTimeline := false
|
globalTimeline := false
|
||||||
|
@ -285,7 +285,12 @@ func (c *Client) TrueRemoteTimeline(ctx context.Context, instance string, instan
|
||||||
globalTimeline = true
|
globalTimeline = true
|
||||||
params.Set(instanceParam, "true")
|
params.Set(instanceParam, "true")
|
||||||
default:
|
default:
|
||||||
params.Set(instanceParam, "true")
|
paramval = strings.Split(instanceParam, "=")
|
||||||
|
if len(paramval) == 2 {
|
||||||
|
params.Set(paramval[0], paramval[1])
|
||||||
|
} else {
|
||||||
|
params.Set(instanceParam, "true")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -313,6 +318,10 @@ func (c *Client) TrueRemoteTimeline(ctx context.Context, instance string, instan
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
if globalTimeline {
|
||||||
|
params.Set("local", "false")
|
||||||
|
}
|
||||||
|
perform.RawQuery = params.Encode()
|
||||||
perform.Path = "api/v1/timelines/public"
|
perform.Path = "api/v1/timelines/public"
|
||||||
method = http.MethodGet
|
method = http.MethodGet
|
||||||
ContentType = "application/x-www-form-urlencoded"
|
ContentType = "application/x-www-form-urlencoded"
|
||||||
|
|
Loading…
Reference in a new issue