@roeehrl/tinode-sdk 0.25.1-sqlite.12 → 0.25.1-sqlite.13
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 +1 -1
- package/src/tinode.js +8 -2
- package/src/topic.js +7 -0
- package/umd/tinode.dev.js +16 -2
- package/umd/tinode.dev.js.map +1 -1
- package/umd/tinode.prod.js +1 -1
- package/umd/tinode.prod.js.map +1 -1
- package/version.js +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@roeehrl/tinode-sdk",
|
|
3
3
|
"description": "Tinode SDK fork with Storage interface for SQLite persistence in React Native",
|
|
4
|
-
"version": "0.25.1-sqlite.
|
|
4
|
+
"version": "0.25.1-sqlite.13",
|
|
5
5
|
"types": "./types/index.d.ts",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"format": "js-beautify -r src/*.js",
|
package/src/tinode.js
CHANGED
|
@@ -505,8 +505,14 @@ export class Tinode {
|
|
|
505
505
|
callbacks.resolve(onOK);
|
|
506
506
|
}
|
|
507
507
|
} else if (callbacks.reject) {
|
|
508
|
-
|
|
509
|
-
|
|
508
|
+
console.log("[Tinode/execPromise] Rejecting:", JSON.stringify({
|
|
509
|
+
code: code,
|
|
510
|
+
errorText: errorText,
|
|
511
|
+
hasOnOK: !!onOK,
|
|
512
|
+
params: onOK ? onOK.params : undefined,
|
|
513
|
+
onOKKeys: onOK ? Object.keys(onOK) : undefined,
|
|
514
|
+
}));
|
|
515
|
+
callbacks.reject(new CommError(errorText, code, onOK ? onOK.params : undefined));
|
|
510
516
|
}
|
|
511
517
|
}
|
|
512
518
|
}
|
package/src/topic.js
CHANGED
|
@@ -381,12 +381,19 @@ export default class Topic {
|
|
|
381
381
|
this._routeData(pub);
|
|
382
382
|
return ctrl;
|
|
383
383
|
}).catch(err => {
|
|
384
|
+
console.log("[Tinode/publishMessage] Error caught:", JSON.stringify({
|
|
385
|
+
code: err.code,
|
|
386
|
+
message: err.message,
|
|
387
|
+
params: err.params,
|
|
388
|
+
name: err.name,
|
|
389
|
+
}));
|
|
384
390
|
this._tinode.logger("WARNING: Message rejected by the server", err);
|
|
385
391
|
pub._sending = false;
|
|
386
392
|
pub._failed = true;
|
|
387
393
|
if (this.onData) {
|
|
388
394
|
this.onData();
|
|
389
395
|
}
|
|
396
|
+
throw err;
|
|
390
397
|
});
|
|
391
398
|
}
|
|
392
399
|
|
package/umd/tinode.dev.js
CHANGED
|
@@ -4218,12 +4218,19 @@ class Topic {
|
|
|
4218
4218
|
this._routeData(pub);
|
|
4219
4219
|
return ctrl;
|
|
4220
4220
|
}).catch(err => {
|
|
4221
|
+
console.log("[Tinode/publishMessage] Error caught:", JSON.stringify({
|
|
4222
|
+
code: err.code,
|
|
4223
|
+
message: err.message,
|
|
4224
|
+
params: err.params,
|
|
4225
|
+
name: err.name
|
|
4226
|
+
}));
|
|
4221
4227
|
this._tinode.logger("WARNING: Message rejected by the server", err);
|
|
4222
4228
|
pub._sending = false;
|
|
4223
4229
|
pub._failed = true;
|
|
4224
4230
|
if (this.onData) {
|
|
4225
4231
|
this.onData();
|
|
4226
4232
|
}
|
|
4233
|
+
throw err;
|
|
4227
4234
|
});
|
|
4228
4235
|
}
|
|
4229
4236
|
publishDraft(pub, prom) {
|
|
@@ -5545,7 +5552,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5545
5552
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
5546
5553
|
/* harmony export */ PACKAGE_VERSION: function() { return /* binding */ PACKAGE_VERSION; }
|
|
5547
5554
|
/* harmony export */ });
|
|
5548
|
-
const PACKAGE_VERSION = "0.25.1-sqlite.
|
|
5555
|
+
const PACKAGE_VERSION = "0.25.1-sqlite.13";
|
|
5549
5556
|
|
|
5550
5557
|
/***/ })
|
|
5551
5558
|
|
|
@@ -6007,7 +6014,14 @@ class Tinode {
|
|
|
6007
6014
|
callbacks.resolve(onOK);
|
|
6008
6015
|
}
|
|
6009
6016
|
} else if (callbacks.reject) {
|
|
6010
|
-
|
|
6017
|
+
console.log("[Tinode/execPromise] Rejecting:", JSON.stringify({
|
|
6018
|
+
code: code,
|
|
6019
|
+
errorText: errorText,
|
|
6020
|
+
hasOnOK: !!onOK,
|
|
6021
|
+
params: onOK ? onOK.params : undefined,
|
|
6022
|
+
onOKKeys: onOK ? Object.keys(onOK) : undefined
|
|
6023
|
+
}));
|
|
6024
|
+
callbacks.reject(new _comm_error_js__WEBPACK_IMPORTED_MODULE_2__["default"](errorText, code, onOK ? onOK.params : undefined));
|
|
6011
6025
|
}
|
|
6012
6026
|
}
|
|
6013
6027
|
}
|