|
|
@ -1,3 +1,4 @@
|
|
|
|
|
|
|
|
import reject from 'lodash/reject'
|
|
|
|
import BlockCard from '../block_card/block_card.vue'
|
|
|
|
import BlockCard from '../block_card/block_card.vue'
|
|
|
|
import userSearchApi from '../../services/new_api/user_search.js'
|
|
|
|
import userSearchApi from '../../services/new_api/user_search.js'
|
|
|
|
|
|
|
|
|
|
|
@ -27,9 +28,12 @@ export default {
|
|
|
|
this.results = []
|
|
|
|
this.results = []
|
|
|
|
if (query) {
|
|
|
|
if (query) {
|
|
|
|
userSearchApi.search({query, store: this.$store})
|
|
|
|
userSearchApi.search({query, store: this.$store})
|
|
|
|
.then((data) => {
|
|
|
|
.then((users) => {
|
|
|
|
this.$store.dispatch('addNewUsers', data)
|
|
|
|
const filteredUsers = reject(users, (user) => {
|
|
|
|
this.results = data
|
|
|
|
return user.statusnet_blocking || user.id === this.$store.state.users.currentUser.id
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
this.$store.dispatch('addNewUsers', filteredUsers)
|
|
|
|
|
|
|
|
this.results = filteredUsers
|
|
|
|
this.resultsVisible = true
|
|
|
|
this.resultsVisible = true
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|