forked from MirrorHub/mautrix-whatsapp
Maybe fix backfilling multiple batches within deferred backfill
Might fix #471
This commit is contained in:
parent
e6da32518e
commit
3933b743e7
1 changed files with 2 additions and 2 deletions
|
@ -142,8 +142,8 @@ func (user *User) createOrUpdatePortalAndBackfillWithLock(req *database.Backfill
|
||||||
msgs = toBackfill
|
msgs = toBackfill
|
||||||
toBackfill = toBackfill[0:0]
|
toBackfill = toBackfill[0:0]
|
||||||
} else {
|
} else {
|
||||||
msgs = toBackfill[len(toBackfill)-req.MaxBatchEvents:]
|
msgs = toBackfill[:len(toBackfill)-req.MaxBatchEvents]
|
||||||
toBackfill = toBackfill[:len(toBackfill)-req.MaxBatchEvents]
|
toBackfill = toBackfill[len(toBackfill)-req.MaxBatchEvents:]
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(msgs) > 0 {
|
if len(msgs) > 0 {
|
||||||
|
|
Loading…
Reference in a new issue