@agentvault/agentvault 0.14.18 → 0.14.20

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
@@ -49468,6 +49468,36 @@ ${messageText}`;
49468
49468
  if (msg.sender_device_id === this._deviceId) continue;
49469
49469
  if (this._syncMessageIds.has(msg.id)) continue;
49470
49470
  this._syncMessageIds.add(msg.id);
49471
+ if (this._persisted?.rooms) {
49472
+ let roomId;
49473
+ for (const room of Object.values(this._persisted.rooms)) {
49474
+ if (room.conversationIds?.includes(msg.conversation_id)) {
49475
+ roomId = room.roomId;
49476
+ break;
49477
+ }
49478
+ }
49479
+ if (roomId) {
49480
+ try {
49481
+ await this._handleRoomMessage({
49482
+ room_id: roomId,
49483
+ sender_device_id: msg.sender_device_id,
49484
+ conversation_id: msg.conversation_id,
49485
+ header_blob: msg.header_blob,
49486
+ ciphertext: msg.ciphertext,
49487
+ message_id: msg.id,
49488
+ created_at: msg.created_at
49489
+ });
49490
+ } catch (roomErr) {
49491
+ console.warn(
49492
+ `[SecureChannel] Sync room message failed for ${msg.conversation_id.slice(0, 8)}...:`,
49493
+ roomErr
49494
+ );
49495
+ }
49496
+ this._persisted.lastMessageTimestamp = msg.created_at;
49497
+ since = msg.created_at;
49498
+ continue;
49499
+ }
49500
+ }
49471
49501
  const session = this._sessions.get(msg.conversation_id);
49472
49502
  if (!session) {
49473
49503
  console.warn(