From 143e1f23f88da24400319518ada8c8298df3f900 Mon Sep 17 00:00:00 2001 From: Andrew Ferrazzutti Date: Sat, 23 Apr 2022 13:58:18 -0400 Subject: [PATCH] Fix error on syncing channel with no new messages --- node/src/client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node/src/client.js b/node/src/client.js index eccb07f..7975d22 100644 --- a/node/src/client.js +++ b/node/src/client.js @@ -690,7 +690,7 @@ export default class PeerClient { const talkChannel = await this.#getUserChannel(req.mxid, req.channel_props) const res = await talkChannel.getChatListFrom(req.sync_from) - if (!res.success) return res + if (!res.success || !res.length) return res while (true) { const nextRes = await talkChannel.getChatListFrom(