@agentvault/agentvault 0.14.19 → 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/channel.d.ts.map +1 -1
- package/dist/cli.js +19 -3
- package/dist/cli.js.map +2 -2
- package/dist/index.js +19 -3
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -49469,14 +49469,30 @@ ${messageText}`;
|
|
|
49469
49469
|
if (this._syncMessageIds.has(msg.id)) continue;
|
|
49470
49470
|
this._syncMessageIds.add(msg.id);
|
|
49471
49471
|
if (this._persisted?.rooms) {
|
|
49472
|
-
let
|
|
49472
|
+
let roomId;
|
|
49473
49473
|
for (const room of Object.values(this._persisted.rooms)) {
|
|
49474
49474
|
if (room.conversationIds?.includes(msg.conversation_id)) {
|
|
49475
|
-
|
|
49475
|
+
roomId = room.roomId;
|
|
49476
49476
|
break;
|
|
49477
49477
|
}
|
|
49478
49478
|
}
|
|
49479
|
-
if (
|
|
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
|
+
}
|
|
49480
49496
|
this._persisted.lastMessageTimestamp = msg.created_at;
|
|
49481
49497
|
since = msg.created_at;
|
|
49482
49498
|
continue;
|