chat4app-client-angular 1.0.9 → 1.0.11
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/bundles/chat4app-client-angular.umd.js +23 -12
- package/bundles/chat4app-client-angular.umd.js.map +1 -1
- package/bundles/chat4app-client-angular.umd.min.js +1 -1
- package/bundles/chat4app-client-angular.umd.min.js.map +1 -1
- package/esm2015/lib/chat4app-client-angular.service.js +15 -13
- package/fesm2015/chat4app-client-angular.js +14 -12
- package/fesm2015/chat4app-client-angular.js.map +1 -1
- package/lib/chat4app-client-angular.service.d.ts +1 -1
- package/lib/chat4app-client-angular.service.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1788,17 +1788,28 @@
|
|
|
1788
1788
|
this.debug = chat4AppConfig.debug;
|
|
1789
1789
|
};
|
|
1790
1790
|
Chat4appClientAngularService.prototype.init = function (securityChatToken, callback, chatCallback, connectionClientId) {
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1791
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1792
|
+
return __generator(this, function (_b) {
|
|
1793
|
+
switch (_b.label) {
|
|
1794
|
+
case 0:
|
|
1795
|
+
if (!this.chatServer || this.chatServer.trim().length == 0) {
|
|
1796
|
+
throw new Error("Endpoint is empty");
|
|
1797
|
+
}
|
|
1798
|
+
if (!securityChatToken || securityChatToken.trim().length == 0) {
|
|
1799
|
+
throw new Error("SecurityChatToken is empty");
|
|
1800
|
+
}
|
|
1801
|
+
this.setTokenChat4app(securityChatToken);
|
|
1802
|
+
if (!(chatCallback && connectionClientId)) return [3 /*break*/, 2];
|
|
1803
|
+
return [4 /*yield*/, this.connectWebsocket(chatCallback, connectionClientId)];
|
|
1804
|
+
case 1:
|
|
1805
|
+
_b.sent();
|
|
1806
|
+
_b.label = 2;
|
|
1807
|
+
case 2:
|
|
1808
|
+
callback(securityChatToken);
|
|
1809
|
+
return [2 /*return*/];
|
|
1810
|
+
}
|
|
1811
|
+
});
|
|
1812
|
+
});
|
|
1802
1813
|
};
|
|
1803
1814
|
Chat4appClientAngularService.prototype.getChatUrlDownload = function (messageFileId) {
|
|
1804
1815
|
return this.chatUrl + "chatmessage/getFile?messageFileId=" + messageFileId + "&token=" + this.getBearerToken();
|
|
@@ -2255,7 +2266,7 @@
|
|
|
2255
2266
|
}
|
|
2256
2267
|
if (!(!this.nc || (this.nc.isClose && this.nc.isClose()))) return [3 /*break*/, 2];
|
|
2257
2268
|
_b = that;
|
|
2258
|
-
return [4 /*yield*/, nats_min.connect({ url: server, user: chatUserExternalId, pass: this.getBearerToken(), reconnect:
|
|
2269
|
+
return [4 /*yield*/, nats_min.connect({ url: server, user: chatUserExternalId, pass: this.getBearerToken(), reconnect: false })];
|
|
2259
2270
|
case 1:
|
|
2260
2271
|
_b.nc = _c.sent();
|
|
2261
2272
|
_c.label = 2;
|