@eleven-am/pondsocket 0.1.40 → 0.1.42
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/client/channel.js +3 -2
- package/package.json +1 -1
- package/server/channel/eventResponse.js +1 -0
- package/types.d.ts +1 -1
package/client/channel.js
CHANGED
|
@@ -35,7 +35,6 @@ class Channel {
|
|
|
35
35
|
else {
|
|
36
36
|
this._queue.push(joinMessage);
|
|
37
37
|
}
|
|
38
|
-
this._publish(joinMessage);
|
|
39
38
|
}
|
|
40
39
|
/**
|
|
41
40
|
* @desc Disconnects from the channel.
|
|
@@ -208,7 +207,9 @@ class Channel {
|
|
|
208
207
|
payload: this._joinParams,
|
|
209
208
|
};
|
|
210
209
|
this._publisher(joinMessage);
|
|
211
|
-
this._queue
|
|
210
|
+
this._queue
|
|
211
|
+
.filter((message) => message.action !== enums_1.ClientActions.JOIN_CHANNEL)
|
|
212
|
+
.forEach((message) => {
|
|
212
213
|
this._publisher(message);
|
|
213
214
|
});
|
|
214
215
|
this._joinState.publish(true);
|
package/package.json
CHANGED
|
@@ -22,6 +22,7 @@ class EventResponse extends abstractResponse_1.PondResponse {
|
|
|
22
22
|
*/
|
|
23
23
|
accept(assigns) {
|
|
24
24
|
this._manageAssigns(assigns);
|
|
25
|
+
this._engine.sendMessage('channel', [this._event.sender], this._event.action, this._event.event, this._event.payload);
|
|
25
26
|
this._hasExecuted = true;
|
|
26
27
|
return this;
|
|
27
28
|
}
|
package/types.d.ts
CHANGED
|
@@ -166,7 +166,7 @@ export declare class Channel {
|
|
|
166
166
|
* @param payload - The message to send.
|
|
167
167
|
* @param recipient - The clients to send the message to.
|
|
168
168
|
*/
|
|
169
|
-
public sendMessage(event: string, payload: PondMessage, recipient
|
|
169
|
+
public sendMessage(event: string, payload: PondMessage, recipient: string[]): void;
|
|
170
170
|
|
|
171
171
|
/**
|
|
172
172
|
* @desc Broadcasts a message to every other client in the channel except yourself.
|