quiq-chat
Advanced tools
Comparing version 1.8.4 to 1.8.90
@@ -229,10 +229,2 @@ 'use strict'; | ||
if (!timedOut && retryCount < 4) { | ||
if (url.includes('/session/web/generate') && fetchRequest.method && fetchRequest.method.toUpperCase() === 'POST') { | ||
if (callbacks.onError) { | ||
callbacks.onError(); | ||
} | ||
return reject(); | ||
} | ||
if (callbacks.onRetryableError) { | ||
@@ -243,3 +235,3 @@ callbacks.onRetryableError(); | ||
retryCount++; | ||
return login().then(validateSession).then(request); | ||
return request(); | ||
} | ||
@@ -262,3 +254,3 @@ | ||
var version = "1.8.4"; | ||
var version = "1.8.90"; | ||
@@ -278,3 +270,3 @@ // | ||
headers: { | ||
'X-Quiq-Line': '1', | ||
'X-Quiq-Line': '2', | ||
'X-Quiq-Client-Id': 'Quiq-Chat-Client', | ||
@@ -281,0 +273,0 @@ 'X-Quiq-Client-Version': version |
{ | ||
"name": "quiq-chat", | ||
"version": "1.8.4", | ||
"version": "1.8.90", | ||
"description": "Library to help with network requests to create a webchat client for Quiq Messaging", | ||
@@ -5,0 +5,0 @@ "main": "build/quiq-chat.js", |
@@ -111,2 +111,3 @@ // @flow | ||
console.log('calling start'); | ||
client.start(); | ||
@@ -113,0 +114,0 @@ }); |
@@ -25,3 +25,3 @@ // @flow | ||
expect(mockFetch.mock.calls[0][1].method).toBe('GET'); | ||
expect(mockFetch.mock.calls[0][1].headers['X-Quiq-Line']).toBe('1'); | ||
expect(mockFetch.mock.calls[0][1].headers['X-Quiq-Line']).toBe('2'); | ||
expect(mockFetch.mock.calls[0][1].headers['X-Quiq-Client-Id']).toBe('Quiq-Chat-Client'); | ||
@@ -28,0 +28,0 @@ expect(mockFetch.mock.calls[0][1].headers['X-Quiq-Client-Version']).toBeDefined(); |
@@ -25,3 +25,3 @@ // @flow | ||
headers: { | ||
'X-Quiq-Line': '1', | ||
'X-Quiq-Line': '2', | ||
'X-Quiq-Client-Id': 'Quiq-Chat-Client', | ||
@@ -28,0 +28,0 @@ 'X-Quiq-Client-Version': version, |
@@ -116,14 +116,2 @@ // @flow | ||
if (!timedOut && retryCount < 4) { | ||
if ( | ||
url.includes('/session/web/generate') && | ||
fetchRequest.method && | ||
fetchRequest.method.toUpperCase() === 'POST' | ||
) { | ||
if (callbacks.onError) { | ||
callbacks.onError(); | ||
} | ||
return reject(); | ||
} | ||
if (callbacks.onRetryableError) { | ||
@@ -134,3 +122,3 @@ callbacks.onRetryableError(); | ||
retryCount++; | ||
return login().then(validateSession).then(request); | ||
return request(); | ||
} | ||
@@ -137,0 +125,0 @@ |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
861861
54
8526