Fix search() not honouring type param
This commit is contained in:
parent
b247a91724
commit
b11ac22192
2 changed files with 7 additions and 3 deletions
|
|
@ -1002,7 +1002,7 @@ const searchUsers = ({ credentials, query }) => {
|
|||
.then((data) => data.map(parseUser))
|
||||
}
|
||||
|
||||
const search2 = ({ credentials, q, resolve, limit, offset, following }) => {
|
||||
const search2 = ({ credentials, q, resolve, limit, offset, following, type }) => {
|
||||
let url = MASTODON_SEARCH_2
|
||||
let params = []
|
||||
|
||||
|
|
@ -1026,6 +1026,10 @@ const search2 = ({ credentials, q, resolve, limit, offset, following }) => {
|
|||
params.push(['following', true])
|
||||
}
|
||||
|
||||
if (type) {
|
||||
params.push(['following', type])
|
||||
}
|
||||
|
||||
params.push(['with_relationships', true])
|
||||
|
||||
let queryString = map(params, (param) => `${param[0]}=${param[1]}`).join('&')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue