aboutsummaryrefslogtreecommitdiff
path: root/matrix
diff options
context:
space:
mode:
authorTulir Asokan <tulir@maunium.net>2019-04-10 02:25:22 +0300
committerTulir Asokan <tulir@maunium.net>2019-04-10 02:25:22 +0300
commitb668c2cdc7b48f7ec98eb17e7a246f158e7d501a (patch)
tree3e435d7c6f9ba85ae37380551ed289eeac3fa7fe /matrix
parent005c51c3b59263e45af7cfeff5a9e6571104e663 (diff)
Fix last cached message not showing up when loading history
Diffstat (limited to 'matrix')
-rw-r--r--matrix/history.go2
1 files changed, 1 insertions, 1 deletions
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)))