@dnotifier-realtime/dnotifier 1.0.9 → 1.0.10

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/dnotifier.js +5 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dnotifier-realtime/dnotifier",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
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,7 @@ export class DNotifier {
196
196
  this.appId = appId;
197
197
  this.secret = secret;
198
198
  this.userId = userId;
199
- // this.url = "wss://34.208.142.201/ws:7072";
199
+ //this.url = "ws://127.0.0.1:7072";
200
200
  this.url = "wss://link.dchatter.com/ws";
201
201
 
202
202
  this.onConnectedCallback = onConnected || (() => {});
@@ -239,11 +239,13 @@ export class DNotifier {
239
239
  appId: this.appId,
240
240
  sender: prefixId(this.appId, this.userId),
241
241
  timestamp: Date.now(),
242
+ token : this.authToken
242
243
  };
243
244
 
244
245
  const payloadBuffer = toUint8(
245
246
  JSON.stringify({ token: this.authToken })
246
247
  );
248
+ // console.log(this.authToken)
247
249
 
248
250
  const frame = framePacket(metadata, payloadBuffer);
249
251
  this.transport.sendBinary(frame);
@@ -316,6 +318,7 @@ export class DNotifier {
316
318
  prefixId(this.appId, id)
317
319
  ),
318
320
  timestamp: Date.now(),
321
+ token : this.authToken
319
322
  };
320
323
 
321
324
  const payloadBuffer = toUint8(JSON.stringify(data));
@@ -337,6 +340,7 @@ export class DNotifier {
337
340
  prefixId(this.appId, id)
338
341
  ),
339
342
  timestamp: Date.now(),
343
+ token : this.authToken
340
344
  };
341
345
 
342
346
  const frame = framePacket(metadata, buffer);