@mtgame/core 0.2.38 → 0.2.40
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.
|
@@ -4033,7 +4033,7 @@
|
|
|
4033
4033
|
}
|
|
4034
4034
|
Object.defineProperty(GameUser.prototype, "gameUserNumber", {
|
|
4035
4035
|
get: function () {
|
|
4036
|
-
return this.number ? this.number : this.teamUser.number;
|
|
4036
|
+
return (this.number || this.number === 0) ? this.number : this.teamUser.number;
|
|
4037
4037
|
},
|
|
4038
4038
|
enumerable: false,
|
|
4039
4039
|
configurable: true
|
|
@@ -13538,6 +13538,7 @@
|
|
|
13538
13538
|
CentrifugoService.prototype.unsubscribe = function (channel) {
|
|
13539
13539
|
if (this.subscriptions[channel]) {
|
|
13540
13540
|
this.subscriptions[channel].unsubscribe();
|
|
13541
|
+
this.centrifuge.removeSubscription(this.subscriptions[channel]);
|
|
13541
13542
|
delete this.subscriptions[channel];
|
|
13542
13543
|
}
|
|
13543
13544
|
if (this.channels$[channel]) {
|
|
@@ -13610,10 +13611,13 @@
|
|
|
13610
13611
|
};
|
|
13611
13612
|
CentrifugoService.prototype.addEngineSubscription = function (channel) {
|
|
13612
13613
|
var _this = this;
|
|
13613
|
-
var sub = this.centrifuge.
|
|
13614
|
-
|
|
13615
|
-
|
|
13616
|
-
|
|
13614
|
+
var sub = this.centrifuge.getSubscription(channel);
|
|
13615
|
+
if (!sub) {
|
|
13616
|
+
sub = this.centrifuge.newSubscription(channel);
|
|
13617
|
+
sub.on('publication', function (ctx) {
|
|
13618
|
+
_this.resolveMessage(channel, ctx.data);
|
|
13619
|
+
});
|
|
13620
|
+
}
|
|
13617
13621
|
sub.subscribe();
|
|
13618
13622
|
return sub;
|
|
13619
13623
|
};
|