diff options
author | Joas Schilling <coding@schilljs.com> | 2021-10-08 10:46:44 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2021-10-11 17:26:08 +0300 |
commit | 1921603ac4be758252a145162ef0647eff6fffec (patch) | |
tree | 333ca6087b191ae06871d9ed32c753005aa642aa /src/store | |
parent | 879a2b7d6924e5c603f83109162e8874aa929647 (diff) |
Add a UI option to change the call setting
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'src/store')
-rw-r--r-- | src/store/conversationsStore.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/store/conversationsStore.js b/src/store/conversationsStore.js index 31a3caf3b..81e209c1f 100644 --- a/src/store/conversationsStore.js +++ b/src/store/conversationsStore.js @@ -37,6 +37,7 @@ import { deleteConversation, clearConversationHistory, setNotificationLevel, + setNotificationCalls, } from '../services/conversationsService' import { getCurrentUser } from '@nextcloud/auth' import { CONVERSATION, WEBINAR, PARTICIPANT } from '../constants' @@ -136,6 +137,10 @@ const mutations = { setNotificationLevel(state, { token, notificationLevel }) { Vue.set(state.conversations[token], 'notificationLevel', notificationLevel) }, + + setNotificationCalls(state, { token, notificationCalls }) { + Vue.set(state.conversations[token], 'notificationCalls', notificationCalls) + }, } const actions = { @@ -440,6 +445,12 @@ const actions = { commit('setNotificationLevel', { token, notificationLevel }) }, + async setNotificationCalls({ commit }, { token, notificationCalls }) { + await setNotificationCalls(token, notificationCalls) + + commit('setNotificationCalls', { token, notificationCalls }) + }, + /** * Creates a new one to one conversation in the backend * with the given actor then adds it to the store. |