@volter/teams 0.1.44 → 0.1.45

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/server/core.mjs +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volter/teams",
3
- "version": "0.1.44",
3
+ "version": "0.1.45",
4
4
  "type": "module",
5
5
  "description": "Volter Teams, the neutral team plane: machine identity and daemon core, the local door and server link, admission from machine grants, product doors, and the Teams server's neutral routes (company RFC 0008).",
6
6
  "license": "MIT",
package/server/core.mjs CHANGED
@@ -61,7 +61,7 @@ export async function maintain(api){const now=api.clock.nowMs();
61
61
  // Replay records expire after a day; keeping them forever can fill the object and stop heartbeats.
62
62
  // Delete them before any retention step that may update a surviving version.
63
63
  const expired=await api.store.query('SELECT rowid FROM idempotency WHERE expires_at<=? LIMIT 1000',[now]);
64
- if(expired.length)await api.store.transaction([{sql:`DELETE FROM idempotency WHERE rowid IN (${expired.map(()=>'?').join(',')})`,params:expired.map(row=>row.rowid)}]);
64
+ if(expired.length)await api.store.transaction([{sql:'DELETE FROM idempotency WHERE rowid IN (SELECT rowid FROM idempotency WHERE expires_at<=? LIMIT 1000)',params:[now]}]);
65
65
  // Deletes go first, each in a transaction of its own: on a full database an insert fails, and a run that begins
66
66
  // with one never reaches the deletes that would make room.
67
67
  // A committed capture's parts are its messages in transit; once committed, the session's version holds them, so