mirror of
https://github.com/TeamPiped/Mautrix-Bot.git
synced 2024-08-14 23:56:15 +00:00
Add search filter.
This commit is contained in:
parent
536ec3b1cc
commit
10e1dc8c88
1 changed files with 2 additions and 2 deletions
4
bot.go
4
bot.go
|
@ -87,7 +87,7 @@ func handleEvent(evt *event.Event) {
|
|||
|
||||
q := content[index:]
|
||||
|
||||
request, err := http.NewRequest("GET", "https://pipedapi.kavin.rocks/search?q="+url.QueryEscape(q), nil)
|
||||
request, err := http.NewRequest("GET", "https://pipedapi.kavin.rocks/search?filter=all&q="+url.QueryEscape(q), nil)
|
||||
|
||||
request.Header.Set("User-Agent", ua)
|
||||
|
||||
|
@ -101,7 +101,7 @@ func handleEvent(evt *event.Event) {
|
|||
log.Panic(err)
|
||||
}
|
||||
|
||||
bArray, err := io.ReadAll(resp.Body)
|
||||
bArray, _ := io.ReadAll(resp.Body)
|
||||
|
||||
var result SearchResult
|
||||
|
||||
|
|
Loading…
Reference in a new issue