@dxos/client-services 0.1.56-main.e47dfd1 → 0.1.56-main.ec96785

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.
@@ -2952,7 +2952,7 @@ var DataSpaceManager = class DataSpaceManager2 {
2952
2952
  localPeerId: this._signingContext.deviceKey
2953
2953
  });
2954
2954
  const presence = new Presence({
2955
- announceInterval: 500,
2955
+ announceInterval: 1e3,
2956
2956
  offlineTimeout: 5e3,
2957
2957
  identityKey: this._signingContext.identityKey,
2958
2958
  gossip
@@ -3229,14 +3229,20 @@ var SpacesServiceImpl = class {
3229
3229
  },
3230
3230
  members: Array.from(space.inner.spaceState.members.values()).map((member) => {
3231
3231
  var _a2, _b2, _c2;
3232
+ const peers = space.presence.getPeersOnline().filter(({ identityKey }) => identityKey.equals(member.key));
3233
+ const isMe = (_a2 = this._identityManager.identity) == null ? void 0 : _a2.identityKey.equals(member.key);
3234
+ if (isMe) {
3235
+ peers.push(space.presence.getLocalState());
3236
+ }
3232
3237
  return {
3233
3238
  identity: {
3234
3239
  identityKey: member.key,
3235
3240
  profile: {
3236
- displayName: (_b2 = (_a2 = member.assertion.profile) == null ? void 0 : _a2.displayName) != null ? _b2 : humanize(member.key)
3241
+ displayName: (_c2 = (_b2 = member.assertion.profile) == null ? void 0 : _b2.displayName) != null ? _c2 : humanize(member.key)
3237
3242
  }
3238
3243
  },
3239
- presence: ((_c2 = this._identityManager.identity) == null ? void 0 : _c2.identityKey.equals(member.key)) || space.presence.getPeersOnline().filter(({ identityKey }) => identityKey.equals(member.key)).length > 0 ? SpaceMember2.PresenceState.ONLINE : SpaceMember2.PresenceState.OFFLINE
3244
+ presence: isMe || peers.length > 0 ? SpaceMember2.PresenceState.ONLINE : SpaceMember2.PresenceState.OFFLINE,
3245
+ peerStates: peers
3240
3246
  };
3241
3247
  }),
3242
3248
  creator: (_g = space.inner.spaceState.creator) == null ? void 0 : _g.key,
@@ -4207,4 +4213,4 @@ export {
4207
4213
  createDefaultModelFactory,
4208
4214
  ClientServicesHost
4209
4215
  };
4210
- //# sourceMappingURL=chunk-CSJSC47N.mjs.map
4216
+ //# sourceMappingURL=chunk-P26UKXYR.mjs.map