@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.js +5 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/binding.test.ts +19 -0
- package/src/channel.ts +7 -3
package/dist/index.js
CHANGED
|
@@ -753,8 +753,11 @@ async function readChannelVersions(cid, reads, founderHint) {
|
|
|
753
753
|
});
|
|
754
754
|
const fresh = add(res);
|
|
755
755
|
for (const e of res.events ?? []) until = Math.min(until ?? Infinity, e.created_at);
|
|
756
|
-
if ((res.events ?? []).length < VERSION_PAGE_LIMIT
|
|
757
|
-
if (page === VERSION_MAX_PAGES - 1)
|
|
756
|
+
if ((res.events ?? []).length < VERSION_PAGE_LIMIT) break;
|
|
757
|
+
if (fresh === 0 || page === VERSION_MAX_PAGES - 1) {
|
|
758
|
+
truncated = true;
|
|
759
|
+
break;
|
|
760
|
+
}
|
|
758
761
|
}
|
|
759
762
|
add(await legacy);
|
|
760
763
|
let incomplete = false;
|