feat: Allow users to mark a conversation as unread (#5924)
Allow users to mark conversations as unread. Loom video: https://www.loom.com/share/ab70552d3c9c48b685da7dfa64be8bb3 fixes: #5552 Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
parent
e593e516b8
commit
606fc9046a
20 changed files with 190 additions and 48 deletions
|
@ -126,6 +126,7 @@
|
|||
@assign-label="onAssignLabels"
|
||||
@update-conversation-status="toggleConversationStatus"
|
||||
@context-menu-toggle="onContextMenuToggle"
|
||||
@mark-as-unread="markAsUnread"
|
||||
/>
|
||||
|
||||
<div v-if="chatListLoading" class="text-center">
|
||||
|
@ -185,6 +186,7 @@ import {
|
|||
hasPressedAltAndJKey,
|
||||
hasPressedAltAndKKey,
|
||||
} from 'shared/helpers/KeyboardHelpers';
|
||||
import { conversationListPageURL } from '../helper/URLHelper';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
@ -637,6 +639,29 @@ export default {
|
|||
this.showAlert(this.$t('BULK_ACTION.ASSIGN_FAILED'));
|
||||
}
|
||||
},
|
||||
async markAsUnread(conversationId) {
|
||||
try {
|
||||
await this.$store.dispatch('markMessagesUnread', {
|
||||
id: conversationId,
|
||||
});
|
||||
const {
|
||||
params: { accountId, inbox_id: inboxId, label, teamId },
|
||||
name,
|
||||
} = this.$route;
|
||||
this.$router.push(
|
||||
conversationListPageURL({
|
||||
accountId,
|
||||
conversationType: name === 'conversation_mentions' ? 'mention' : '',
|
||||
customViewId: this.foldersId,
|
||||
inboxId,
|
||||
label,
|
||||
teamId,
|
||||
})
|
||||
);
|
||||
} catch (error) {
|
||||
// Ignore error
|
||||
}
|
||||
},
|
||||
async onAssignTeam(team, conversationId = null) {
|
||||
try {
|
||||
await this.$store.dispatch('assignTeam', {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue