From 97746307f086a7585a944a8e7a214daed2c4a7f8 Mon Sep 17 00:00:00 2001 From: Beaudan Brown Date: Mon, 9 Sep 2019 16:11:51 +1000 Subject: [PATCH] Make sure we are always updating the last deleted id --- js/modules/loki_public_chat_api.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/js/modules/loki_public_chat_api.js b/js/modules/loki_public_chat_api.js index 51ac48520..20e061083 100644 --- a/js/modules/loki_public_chat_api.js +++ b/js/modules/loki_public_chat_api.js @@ -474,14 +474,9 @@ class LokiPublicChannelAPI { }); }); - // if we had a problem break the loop - if (res.response.data.length < 200) { - break; - } - // update where we last checked this.deleteLastId = res.response.meta.max_id; - ({ more } = res.response); + more = res.response.more && res.response.data.length >= params.count; } }