Comparing version 1.4.5 to 1.4.6
31
index.js
@@ -11,2 +11,12 @@ // @ts-ignore | ||
let currentPathToCheckWithMemoize = pathTracker.getCurrentPath(); | ||
// Getting the device data to emit | ||
const appVersion = navigator.appVersion; | ||
const model = navigator.appCodeName; | ||
const id = appVersion; | ||
const platform = "web"; | ||
const os = null; | ||
const serial = null; | ||
const manufacturer = navigator.vendor; | ||
const connectSocket = (url) => { | ||
@@ -26,2 +36,21 @@ return new Promise((resolve, reject) => { | ||
if (appVersion && model && manufacturer) { | ||
socket.emit( | ||
"device", | ||
{ | ||
app_Version: appVersion, | ||
model: model, | ||
id: appVersion, | ||
platform: "Web", | ||
os: null, | ||
serial: null, | ||
manufacturer: manufacturer, | ||
}, | ||
() => { | ||
console.log("Device emited!"); | ||
return true; | ||
} | ||
); | ||
} | ||
socket.on("connect_error", (error) => { | ||
@@ -81,3 +110,3 @@ reject(error); | ||
console.log("Emitted!"); | ||
alert("Emmited!"); | ||
// alert("Emmited!"); | ||
} | ||
@@ -84,0 +113,0 @@ ); |
@@ -7,3 +7,3 @@ { | ||
"name": "sockettwo", | ||
"version": "1.4.5", | ||
"version": "1.4.6", | ||
"main": "index.js", | ||
@@ -10,0 +10,0 @@ "scripts": { |
5324
171