Fix search sending type=None if not specified

This commit is contained in:
Ivan Habunek 2023-11-19 14:17:03 +01:00
parent 540851713c
commit 45962b27c3
No known key found for this signature in database
GPG key ID: F5F0623FF5EBCB3D

View file

@ -452,11 +452,13 @@ def search(app, user, query, resolve=False, type=None):
Perform a search.
https://docs.joinmastodon.org/methods/search/#v2
"""
return http.get(app, user, "/api/v2/search", {
params = drop_empty_values({
"q": query,
"resolve": resolve,
"resolve": str_bool(resolve),
"type": type
}).json()
})
return http.get(app, user, "/api/v2/search", params).json()
def follow(app, user, account):