feat: Add actions and API for deleting message via API (#2519)
This commit is contained in:
committed by
GitHub
parent
b705eb39e2
commit
044b6872a4
@@ -178,6 +178,20 @@ const actions = {
|
||||
commit(types.default.ADD_MESSAGE, message);
|
||||
},
|
||||
|
||||
deleteMessage: async function deleteLabels(
|
||||
{ commit },
|
||||
{ conversationId, messageId }
|
||||
) {
|
||||
try {
|
||||
const response = await MessageApi.delete(conversationId, messageId);
|
||||
const { data } = response;
|
||||
// The delete message is actually deleting the content.
|
||||
commit(types.default.ADD_MESSAGE, data);
|
||||
} catch (error) {
|
||||
throw new Error(error);
|
||||
}
|
||||
},
|
||||
|
||||
addConversation({ commit, state, dispatch }, conversation) {
|
||||
const { currentInbox } = state;
|
||||
const {
|
||||
|
||||
Reference in New Issue
Block a user