From b668c2cdc7b48f7ec98eb17e7a246f158e7d501a Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Wed, 10 Apr 2019 02:25:22 +0300 Subject: Fix last cached message not showing up when loading history --- matrix/history.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'matrix') diff --git a/matrix/history.go b/matrix/history.go index 980b942..0cfb84e 100644 --- a/matrix/history.go +++ b/matrix/history.go @@ -185,7 +185,7 @@ func (hm *HistoryManager) Load(room *rooms.Room, num int) (events []*mautrix.Eve } ptrStart, ok := hm.historyLoadPtr[room] if !ok { - ptrStart = stream.Sequence() + ptrStart = stream.Sequence() + 1 } c := stream.Cursor() k, v := c.Seek(itob(ptrStart - uint64(num))) -- cgit v1.2.3