feat: update tool-chain to latest (#7975)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
@@ -32,9 +32,8 @@ export const shouldTriggerMessageUpdateEvent = message => {
|
||||
if (!previousChanges) {
|
||||
return false;
|
||||
}
|
||||
const hasNotifiableAttributeChanges = Object.keys(previousChanges).includes(
|
||||
'content_attributes'
|
||||
);
|
||||
const hasNotifiableAttributeChanges =
|
||||
Object.keys(previousChanges).includes('content_attributes');
|
||||
if (!hasNotifiableAttributeChanges) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -84,15 +84,16 @@ class ActionCableConnector extends BaseActionCableConnector {
|
||||
this.app.$store.dispatch('agent/updatePresence', data.users);
|
||||
};
|
||||
|
||||
// eslint-disable-next-line class-methods-use-this
|
||||
onContactMerge = data => {
|
||||
const { pubsub_token: pubsubToken } = data;
|
||||
ActionCableConnector.refreshConnector(pubsubToken);
|
||||
};
|
||||
|
||||
onTypingOn = data => {
|
||||
const activeConversationId = this.app.$store.getters[
|
||||
'conversationAttributes/getConversationParams'
|
||||
].id;
|
||||
const activeConversationId =
|
||||
this.app.$store.getters['conversationAttributes/getConversationParams']
|
||||
.id;
|
||||
const isUserTypingOnAnotherConversation =
|
||||
data.conversation && data.conversation.id !== activeConversationId;
|
||||
|
||||
|
||||
@@ -11,14 +11,12 @@ describe('#IFrameHelper', () => {
|
||||
it('returns if the event is valid', () => {
|
||||
expect(
|
||||
IFrameHelper.isAValidEvent({
|
||||
data:
|
||||
'chatwoot-widget:{"event":"config-set","locale":"fr","position":"left","hideMessageBubble":false,"showPopoutButton":true}',
|
||||
data: 'chatwoot-widget:{"event":"config-set","locale":"fr","position":"left","hideMessageBubble":false,"showPopoutButton":true}',
|
||||
})
|
||||
).toEqual(true);
|
||||
expect(
|
||||
IFrameHelper.isAValidEvent({
|
||||
data:
|
||||
'{"event":"config-set","locale":"fr","position":"left","hideMessageBubble":false,"showPopoutButton":true}',
|
||||
data: '{"event":"config-set","locale":"fr","position":"left","hideMessageBubble":false,"showPopoutButton":true}',
|
||||
})
|
||||
).toEqual(false);
|
||||
});
|
||||
@@ -27,8 +25,7 @@ describe('#IFrameHelper', () => {
|
||||
it('returns parsed message', () => {
|
||||
expect(
|
||||
IFrameHelper.getMessage({
|
||||
data:
|
||||
'chatwoot-widget:{"event":"config-set","locale":"fr","position":"left","hideMessageBubble":false,"showPopoutButton":true}',
|
||||
data: 'chatwoot-widget:{"event":"config-set","locale":"fr","position":"left","hideMessageBubble":false,"showPopoutButton":true}',
|
||||
})
|
||||
).toEqual({
|
||||
event: 'config-set',
|
||||
|
||||
Reference in New Issue
Block a user