@eleven-am/pondsocket 0.1.132 → 0.1.134

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.
@@ -40,6 +40,9 @@ class Channel {
40
40
  getAssigns() {
41
41
  return __classPrivateFieldGet(this, _Channel_engine, "f").getAssigns();
42
42
  }
43
+ getPresences() {
44
+ return __classPrivateFieldGet(this, _Channel_engine, "f").presenceEngine.getPresence();
45
+ }
43
46
  getUserData(userId) {
44
47
  return __classPrivateFieldGet(this, _Channel_engine, "f").getUserData(userId);
45
48
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eleven-am/pondsocket",
3
- "version": "0.1.132",
3
+ "version": "0.1.134",
4
4
  "description": "PondSocket is a fast simple socket server",
5
5
  "keywords": [
6
6
  "socket",
package/types.d.ts CHANGED
@@ -45,7 +45,6 @@ interface LeaveEvent<EventTypes extends PondEvenType = PondEvenType, PresenceTyp
45
45
 
46
46
  type LeaveCallback<EventTypes extends PondEvenType = PondEvenType, PresenceType extends PondPresence = PondPresence, AssignType extends PondAssigns = PondAssigns> = (event: LeaveEvent<EventTypes, PresenceType, AssignType>) => void;
47
47
 
48
-
49
48
  type PondEvenType = { [key: string]: PondMessage };
50
49
 
51
50
  interface UserData<PresenceType extends PondPresence = PondPresence, AssignType extends PondAssigns = PondAssigns> {
@@ -204,6 +203,11 @@ export declare class Channel<EventType extends PondEvenType = PondEvenType, Pres
204
203
  */
205
204
  getAssigns (): Record<string, AssignType>;
206
205
 
206
+ /**
207
+ * @desc Gets the current presence data for the channel.
208
+ */
209
+ getPresences (): Record<string, PresenceType>;
210
+
207
211
  /**
208
212
  * @desc Gets the assign date for a specific user.
209
213
  * @param userId - The id of the user to get the assign data for.