@agentvault/agentvault 0.14.16 → 0.14.17

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/dist/index.js CHANGED
@@ -48249,6 +48249,14 @@ ${messageText}`;
48249
48249
  */
48250
48250
  async _relaySyncToSiblings(sourceConvId, senderOwnerDeviceId, messageText, topicId) {
48251
48251
  if (!this._ws || this._sessions.size <= 1) return;
48252
+ const roomConvIds = /* @__PURE__ */ new Set();
48253
+ if (this._persisted?.rooms) {
48254
+ for (const room of Object.values(this._persisted.rooms)) {
48255
+ for (const cid of room.conversationIds) {
48256
+ roomConvIds.add(cid);
48257
+ }
48258
+ }
48259
+ }
48252
48260
  const syncPayload = JSON.stringify({
48253
48261
  type: "sync",
48254
48262
  sender: senderOwnerDeviceId,
@@ -48259,6 +48267,7 @@ ${messageText}`;
48259
48267
  for (const [siblingConvId, siblingSession] of this._sessions) {
48260
48268
  if (siblingConvId === sourceConvId) continue;
48261
48269
  if (!siblingSession.activated) continue;
48270
+ if (roomConvIds.has(siblingConvId)) continue;
48262
48271
  const syncEncrypted = siblingSession.ratchet.encrypt(syncPayload);
48263
48272
  const syncTransport = encryptedMessageToTransport(syncEncrypted);
48264
48273
  this._ws.send(