Add basic user profiles.

This commit is contained in:
Roger Braun 2016-11-30 23:32:22 +01:00
parent 83a376a254
commit fcccb9df68
5 changed files with 38 additions and 2 deletions

View file

@ -4,6 +4,7 @@ import { map, each, find, merge } from 'lodash'
// TODO: Unify with mergeOrAdd in statuses.js
export const mergeOrAdd = (arr, item) => {
if (!item) { return false }
const oldItem = find(arr, {id: item.id})
if (oldItem) {
// We already have this, so only merge the new info.