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 timelineFetcher from '../services/timeline_fetcher/timeline_fetcher.service.js'
|
||||||
import backendInteractorService from '../services/backend_interactor_service/backend_interactor_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
|
// TODO: Unify with mergeOrAdd in statuses.js
|
||||||
export const mergeOrAdd = (arr, item) => {
|
export const mergeOrAdd = (arr, item) => {
|
||||||
|
@ -44,7 +44,9 @@ const users = {
|
||||||
actions: {
|
actions: {
|
||||||
addNewStatuses (store, { statuses }) {
|
addNewStatuses (store, { statuses }) {
|
||||||
const users = map(statuses, 'user')
|
const users = map(statuses, 'user')
|
||||||
|
const retweetedUsers = compact(map(statuses, 'retweeted_status.user'))
|
||||||
store.commit('addNewUsers', users)
|
store.commit('addNewUsers', users)
|
||||||
|
store.commit('addNewUsers', retweetedUsers)
|
||||||
},
|
},
|
||||||
loginUser (store, userCredentials) {
|
loginUser (store, userCredentials) {
|
||||||
const commit = store.commit
|
const commit = store.commit
|
||||||
|
|
Loading…
Reference in a new issue