feat: Ability to unmute muted conversations (#1319)

This commit is contained in:
Dmitriy Shcherbakan
2020-10-08 09:32:08 +03:00
committed by GitHub
parent 2aad33a5be
commit ecebe163e1
13 changed files with 242 additions and 0 deletions

View File

@@ -224,6 +224,15 @@ const actions = {
}
},
unmuteConversation: async ({ commit }, conversationId) => {
try {
await ConversationApi.unmute(conversationId);
commit(types.default.UNMUTE_CONVERSATION);
} catch (error) {
//
}
},
sendEmailTranscript: async (_, { conversationId, email }) => {
try {
await ConversationApi.sendEmailTranscript({ conversationId, email });

View File

@@ -73,6 +73,11 @@ export const mutations = {
chat.muted = true;
},
[types.default.UNMUTE_CONVERSATION](_state) {
const [chat] = getSelectedChatConversation(_state);
chat.muted = false;
},
[types.default.SEND_MESSAGE](_state, currentMessage) {
const [chat] = getSelectedChatConversation(_state);
const allMessagesExceptCurrent = (chat.messages || []).filter(