@dnotifier-realtime/dnotifier 1.0.7 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dnotifier-realtime/dnotifier",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
4
4
  "description": "Real-time notification & messaging SDK",
5
5
  "main": "src/dnotifier.js",
6
6
  "type": "module",
package/src/dnotifier.js CHANGED
@@ -196,7 +196,8 @@ export class DNotifier {
196
196
  this.appId = appId;
197
197
  this.secret = secret;
198
198
  this.userId = userId;
199
- this.url = "ws://34.208.142.201:7072";
199
+ // this.url = "wss://34.208.142.201/ws:7072";
200
+ this.url = "wss://link.dchatter.com/ws";
200
201
 
201
202
  this.onConnectedCallback = onConnected || (() => {});
202
203
  this.onMessageCallback = onMessage || (() => {});
@@ -100,8 +100,8 @@ export class WebsocketTransport extends EventEmitter {
100
100
 
101
101
  // 📩 MESSAGE
102
102
  this._on("message", async (event, isBinary) => {
103
- console.log('event', event)
104
- const data = event?.data ?? event;
103
+ // console.log('event', event)
104
+ var data = event?.data ?? event;
105
105
 
106
106
  // Convert Blob -> ArrayBuffer in browser
107
107
  if (typeof Blob !== "undefined" && data instanceof Blob) {
@@ -18,7 +18,6 @@ export class Payload {
18
18
  try {
19
19
  return JSON.parse(this.buffer.toString(encoding));
20
20
  } catch (err) {
21
- console.log(err)
22
21
  return null;
23
22
  }
24
23
  }