From e9e623abf6c37a9e886a1ffaefb99e407f01cde1 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Thu, 1 Apr 2021 12:31:39 +0300 Subject: [PATCH] Increment chunk num so backfill logs work correctly --- portal.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/portal.go b/portal.go index f9be041..4d7bb38 100644 --- a/portal.go +++ b/portal.go @@ -893,8 +893,9 @@ func (portal *Portal) FillInitialHistory(user *User) error { var messages []interface{} before := "" fromMe := true - chunkNum := 1 + chunkNum := 0 for n > 0 { + chunkNum += 1 count := 50 if n < count { count = n