quiq-chat
Advanced tools
Comparing version 1.15.2 to 1.15.3
@@ -209,3 +209,3 @@ 'use strict'; | ||
var version = "1.15.2"; | ||
var version = "1.15.3"; | ||
@@ -1447,5 +1447,3 @@ function _classCallCheck$1(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
this.checkForAgents = function () { | ||
return checkForAgents(); | ||
}; | ||
this.checkForAgents = lodash.throttle(checkForAgents, 10000, { trailing: false }); | ||
@@ -1452,0 +1450,0 @@ this.isStorageEnabled = function () { |
{ | ||
"name": "quiq-chat", | ||
"version": "1.15.2", | ||
"version": "1.15.3", | ||
"description": | ||
@@ -5,0 +5,0 @@ "Library to help with network requests to create a webchat client for Quiq Messaging", |
@@ -118,3 +118,3 @@ # quiq-chat [](https://travis-ci.org/Quiq/quiq-chat) [](https://badge.fury.io/js/quiq-chat) [](https://github.com/prettier/prettier) | ||
#### checkForAgents() => Promise<{available: boolean}> | ||
Fetches whether or not there are agents available for the contact point the webchat is connected to | ||
Fetches whether or not there are agents available for the contact point the webchat is connected to. The value of this call is cached for 10 seconds. | ||
@@ -121,0 +121,0 @@ #### updateMessagePreview(text:string, typing:boolean) => void |
@@ -12,3 +12,3 @@ // @flow | ||
import type {ChatMessage, BurnItDownMessage, TextMessage, ApiError, Event} from './types'; | ||
import {differenceBy, unionBy, partition} from 'lodash'; | ||
import {differenceBy, unionBy, partition, throttle} from 'lodash'; | ||
import {sortByTimestamp, burnItDown, registerOnBurnCallback} from './Utils/utils'; | ||
@@ -228,6 +228,3 @@ import type {QuiqChatCallbacks} from 'types'; | ||
checkForAgents = () => { | ||
return API.checkForAgents(); | ||
}; | ||
checkForAgents = throttle(API.checkForAgents, 10000, {trailing: false}); | ||
isStorageEnabled = () => storage.isStorageEnabled(); | ||
@@ -234,0 +231,0 @@ isChatVisible = (): boolean => storage.getQuiqChatContainerVisible(); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
9929
1195532
80