From 66ef9f1328f155d50775d55445522c11cd17fa01 Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Mon, 13 Feb 2017 23:22:32 +0100 Subject: Add users muting. --- src/modules/users.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/modules/users.js') diff --git a/src/modules/users.js b/src/modules/users.js index 8ba365f3..544ca158 100644 --- a/src/modules/users.js +++ b/src/modules/users.js @@ -1,6 +1,7 @@ import timelineFetcher from '../services/timeline_fetcher/timeline_fetcher.service.js' import backendInteractorService from '../services/backend_interactor_service/backend_interactor_service.js' import { compact, map, each, find, merge } from 'lodash' +import { set } from 'vue' // TODO: Unify with mergeOrAdd in statuses.js export const mergeOrAdd = (arr, item) => { @@ -18,6 +19,10 @@ export const mergeOrAdd = (arr, item) => { } export const mutations = { + setMuted (state, { user: {id}, muted }) { + const user = find(state.users, {id}) + set(user, 'muted', muted) + }, setCurrentUser (state, user) { state.currentUser = user }, -- cgit v1.2.3-70-g09d2