@orangecheck/chat-core 0.1.0 → 0.1.1

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.mjs CHANGED
@@ -754,8 +754,11 @@ async function readChannelVersions(cid, reads, founderHint) {
754
754
  });
755
755
  const fresh = add(res);
756
756
  for (const e of res.events ?? []) until = Math.min(until ?? Infinity, e.created_at);
757
- if ((res.events ?? []).length < VERSION_PAGE_LIMIT || fresh === 0) break;
758
- if (page === VERSION_MAX_PAGES - 1) truncated = true;
757
+ if ((res.events ?? []).length < VERSION_PAGE_LIMIT) break;
758
+ if (fresh === 0 || page === VERSION_MAX_PAGES - 1) {
759
+ truncated = true;
760
+ break;
761
+ }
759
762
  }
760
763
  add(await legacy);
761
764
  let incomplete = false;