Merge branch 'feature/follow' into 'develop'

Feature/follow

See merge request !11
This commit is contained in:
lambadalambda 2017-01-01 12:11:55 -05:00
commit eac8fe0c33
5 changed files with 84 additions and 1 deletions

View file

@ -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