зеркало из https://github.com/nextcloud/spreed.git
Move to token based identifiers
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Родитель
9ccbda1016
Коммит
d64429028f
|
@ -41,7 +41,7 @@ const mutations = {
|
|||
* @param {object} conversation the conversation;
|
||||
*/
|
||||
addConversation(state, conversation) {
|
||||
Vue.set(state.conversations, conversation.id, conversation)
|
||||
Vue.set(state.conversations, conversation.token, conversation)
|
||||
},
|
||||
/**
|
||||
* Creates a key-value pair with conversation id and name
|
||||
|
@ -49,11 +49,11 @@ const mutations = {
|
|||
*
|
||||
* @param {object} state current state object;
|
||||
* @param {object} object destructuring object;
|
||||
* @param {int} object.id conversation id;
|
||||
* @param {string} object.token conversation token;
|
||||
* @param {string} object.displayName conversation name;
|
||||
*/
|
||||
indexConversationName(state, { id, displayName }) {
|
||||
Vue.set(state.conversationsNames, id, displayName)
|
||||
indexConversationName(state, { token, displayName }) {
|
||||
Vue.set(state.conversationsNames, token, displayName)
|
||||
},
|
||||
/**
|
||||
* Deletes a conversation from the store.
|
||||
|
@ -61,8 +61,8 @@ const mutations = {
|
|||
* @param {object} conversation the message;
|
||||
*/
|
||||
deleteConversation(state, conversation) {
|
||||
Vue.delete(state.conversations, conversation.id)
|
||||
Vue.delete(state.conversationsNames, conversation.id)
|
||||
Vue.delete(state.conversations, conversation.token)
|
||||
Vue.delete(state.conversationsNames, conversation.token)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче