Merge branch 'develop' into 'feat/conversation-muting'
# Conflicts: # src/components/extra_buttons/extra_buttons.js # src/components/extra_buttons/extra_buttons.vue
This commit is contained in:
commit
d3f6b581d1
28 changed files with 638 additions and 177 deletions
|
@ -70,6 +70,7 @@ const MASTODON_UNPIN_OWN_STATUS = id => `/api/v1/statuses/${id}/unpin`
|
|||
const MASTODON_MUTE_CONVERSATION = id => `/api/v1/statuses/${id}/mute`
|
||||
const MASTODON_UNMUTE_CONVERSATION = id => `/api/v1/statuses/${id}/unmute`
|
||||
const MASTODON_SEARCH_2 = `/api/v2/search`
|
||||
const MASTODON_USER_SEARCH_URL = '/api/v1/accounts/search'
|
||||
|
||||
const oldfetch = window.fetch
|
||||
|
||||
|
@ -865,6 +866,18 @@ const reportUser = ({ credentials, userId, statusIds, comment, forward }) => {
|
|||
})
|
||||
}
|
||||
|
||||
const searchUsers = ({ credentials, query }) => {
|
||||
return promisedRequest({
|
||||
url: MASTODON_USER_SEARCH_URL,
|
||||
params: {
|
||||
q: query,
|
||||
resolve: true
|
||||
},
|
||||
credentials
|
||||
})
|
||||
.then((data) => data.map(parseUser))
|
||||
}
|
||||
|
||||
const search2 = ({ credentials, q, resolve, limit, offset, following }) => {
|
||||
let url = MASTODON_SEARCH_2
|
||||
let params = []
|
||||
|
@ -974,7 +987,8 @@ const apiService = {
|
|||
fetchRebloggedByUsers,
|
||||
reportUser,
|
||||
updateNotificationSettings,
|
||||
search2
|
||||
search2,
|
||||
searchUsers
|
||||
}
|
||||
|
||||
export default apiService
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue