mirror of
https://git.youjo.love/youjo/youjo-fe.git
synced 2024-11-20 13:59:55 +01:00
Also add retweeted users to user store.
This commit is contained in:
parent
7b5a30db14
commit
f18f87747f
1 changed files with 3 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
|||
import timelineFetcher from '../services/timeline_fetcher/timeline_fetcher.service.js'
|
||||
import backendInteractorService from '../services/backend_interactor_service/backend_interactor_service.js'
|
||||
import { map, each, find, merge } from 'lodash'
|
||||
import { compact, map, each, find, merge } from 'lodash'
|
||||
|
||||
// TODO: Unify with mergeOrAdd in statuses.js
|
||||
export const mergeOrAdd = (arr, item) => {
|
||||
|
@ -44,7 +44,9 @@ const users = {
|
|||
actions: {
|
||||
addNewStatuses (store, { statuses }) {
|
||||
const users = map(statuses, 'user')
|
||||
const retweetedUsers = compact(map(statuses, 'retweeted_status.user'))
|
||||
store.commit('addNewUsers', users)
|
||||
store.commit('addNewUsers', retweetedUsers)
|
||||
},
|
||||
loginUser (store, userCredentials) {
|
||||
const commit = store.commit
|
||||
|
|
Loading…
Reference in a new issue