fix: Disable typing indicator for user when agent is typing a private note (#3303)
This commit is contained in:
@@ -51,9 +51,10 @@ class ConversationApi extends ApiClient {
|
||||
return axios.post(`${this.url}/${id}/update_last_seen`);
|
||||
}
|
||||
|
||||
toggleTyping({ conversationId, status }) {
|
||||
toggleTyping({ conversationId, status, isPrivate }) {
|
||||
return axios.post(`${this.url}/${conversationId}/toggle_typing_status`, {
|
||||
typing_status: status,
|
||||
is_private: isPrivate
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -415,9 +415,11 @@ export default {
|
||||
},
|
||||
toggleTyping(status) {
|
||||
const conversationId = this.currentChat.id;
|
||||
const isPrivate = this.isPrivate;
|
||||
this.$store.dispatch('conversationTypingStatus/toggleTyping', {
|
||||
status,
|
||||
conversationId,
|
||||
isPrivate,
|
||||
});
|
||||
},
|
||||
onFileUpload(file) {
|
||||
|
||||
@@ -12,9 +12,9 @@ export const getters = {
|
||||
};
|
||||
|
||||
export const actions = {
|
||||
toggleTyping: async (_, { status, conversationId }) => {
|
||||
toggleTyping: async (_, { status, conversationId, isPrivate }) => {
|
||||
try {
|
||||
await ConversationAPI.toggleTyping({ status, conversationId });
|
||||
await ConversationAPI.toggleTyping({ status, conversationId, isPrivate });
|
||||
} catch (error) {
|
||||
// Handle error
|
||||
}
|
||||
|
||||
@@ -55,7 +55,10 @@ class ActionCableConnector extends BaseActionCableConnector {
|
||||
ActionCableConnector.refreshConnector(pubsubToken);
|
||||
};
|
||||
|
||||
onTypingOn = () => {
|
||||
onTypingOn = data => {
|
||||
if (data.is_private) {
|
||||
return
|
||||
}
|
||||
this.clearTimer();
|
||||
this.app.$store.dispatch('conversation/toggleAgentTyping', {
|
||||
status: 'on',
|
||||
|
||||
Reference in New Issue
Block a user