feat: Add a read indicator for web-widget channel (#4224)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
parent
f2f0d466f2
commit
2b2252b66e
15 changed files with 109 additions and 1 deletions
|
@ -23,6 +23,7 @@ class ActionCableConnector extends BaseActionCableConnector {
|
|||
'contact.updated': this.onContactUpdate,
|
||||
'conversation.mentioned': this.onConversationMentioned,
|
||||
'notification.created': this.onNotificationCreated,
|
||||
'conversation.read': this.onConversationRead,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -64,6 +65,11 @@ class ActionCableConnector extends BaseActionCableConnector {
|
|||
this.fetchConversationStats();
|
||||
};
|
||||
|
||||
onConversationRead = data => {
|
||||
const { contact_last_seen_at: lastSeen } = data;
|
||||
this.app.$store.dispatch('updateConversationRead', lastSeen);
|
||||
};
|
||||
|
||||
onLogout = () => AuthAPI.logout();
|
||||
|
||||
onMessageCreated = data => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue