diff options
| author | Shpuld Shpludson <shp@cock.li> | 2020-01-15 16:35:13 +0000 |
|---|---|---|
| committer | Shpuld Shpludson <shp@cock.li> | 2020-01-15 16:35:13 +0000 |
| commit | 3ab128e73924ce34d190ff609cb9b081cdffe402 (patch) | |
| tree | bba013a7d61688b90c1f59a8f9fa6c3323b72a05 /src/components/who_to_follow/who_to_follow.js | |
| parent | 7c26435e66fd7e142ea4b88fbe51eede32eeb5ce (diff) | |
| parent | 7397636914a9d3e7fd30373034c25175273ab808 (diff) | |
Merge branch 'develop' into 'master'
`master` refresh with `develop`
See merge request pleroma/pleroma-fe!1028
Diffstat (limited to 'src/components/who_to_follow/who_to_follow.js')
| -rw-r--r-- | src/components/who_to_follow/who_to_follow.js | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/components/who_to_follow/who_to_follow.js b/src/components/who_to_follow/who_to_follow.js index be0b8827..ecd97dd7 100644 --- a/src/components/who_to_follow/who_to_follow.js +++ b/src/components/who_to_follow/who_to_follow.js @@ -16,19 +16,11 @@ const WhoToFollow = { methods: { showWhoToFollow (reply) { reply.forEach((i, index) => { - const user = { - id: 0, - name: i.display_name, - screen_name: i.acct, - profile_image_url: i.avatar || '/images/avi.png' - } - this.users.push(user) - - this.$store.state.api.backendInteractor.externalProfile(user.screen_name) + this.$store.state.api.backendInteractor.fetchUser({ id: i.acct }) .then((externalUser) => { if (!externalUser.error) { this.$store.commit('addNewUsers', [externalUser]) - user.id = externalUser.id + this.users.push(externalUser) } }) }) @@ -36,7 +28,7 @@ const WhoToFollow = { getWhoToFollow () { const credentials = this.$store.state.users.currentUser.credentials if (credentials) { - apiService.suggestions({credentials: credentials}) + apiService.suggestions({ credentials: credentials }) .then((reply) => { this.showWhoToFollow(reply) }) |
