@decentnetwork/lan 0.1.304 → 0.1.305

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.
@@ -135,6 +135,12 @@ export class MessageStore {
135
135
  arr = [];
136
136
  this.byPeer.set(peer, arr);
137
137
  }
138
+ // ts is the paging cursor (`before` is strict), so it must be unique per
139
+ // thread: a burst in one millisecond would otherwise be split by a page
140
+ // boundary and the rest of it skipped. Order is kept; the id is not touched.
141
+ const newest = arr.length ? arr[arr.length - 1].ts : -Infinity;
142
+ if (msg.ts <= newest)
143
+ msg.ts = newest + 1;
138
144
  arr.push(msg);
139
145
  if (arr.length > MAX_PER_PEER)
140
146
  arr.splice(0, arr.length - MAX_PER_PEER);
@@ -1,4 +1,4 @@
1
- window.__DK_UI_VERSION="0.1.304";
1
+ window.__DK_UI_VERSION="0.1.305";
2
2
  const ICON_PATHS = {
3
3
  // ---- tab bar (the four must feel like one set) ----
4
4
  users: '<path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M22 21v-2a4 4 0 0 0-3-3.87"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/>',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decentnetwork/lan",
3
- "version": "0.1.304",
3
+ "version": "0.1.305",
4
4
  "description": "Private virtual LAN for self-hosted services and AI agents, built on Elastos Carrier. NAT-traversal, name service, ACL, all over a peer-to-peer mesh — no public IP required.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",