@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.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
|
|
758
|
-
if (page === VERSION_MAX_PAGES - 1)
|
|
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;
|