forked from MirrorHub/mautrix-whatsapp
historysync: fix typo
Signed-off-by: Sumner Evans <sumner@beeper.com>
This commit is contained in:
parent
f8a6afd66e
commit
f51fb5c5c2
2 changed files with 3 additions and 3 deletions
|
@ -399,7 +399,7 @@ func (user *User) handleHistorySync(backfillQueue *BackfillQueue, evt *waProto.H
|
|||
switch evt.GetSyncType() {
|
||||
case waProto.HistorySync_INITIAL_BOOTSTRAP:
|
||||
// Enqueue immediate backfills for the most recent messages first.
|
||||
user.EnqueueImmedateBackfills(portals)
|
||||
user.EnqueueImmediateBackfills(portals)
|
||||
case waProto.HistorySync_FULL, waProto.HistorySync_RECENT:
|
||||
user.EnqueueForwardBackfills(portals)
|
||||
// Enqueue deferred backfills as configured.
|
||||
|
@ -420,7 +420,7 @@ func getConversationTimestamp(conv *waProto.Conversation) uint64 {
|
|||
return convTs
|
||||
}
|
||||
|
||||
func (user *User) EnqueueImmedateBackfills(portals []*Portal) {
|
||||
func (user *User) EnqueueImmediateBackfills(portals []*Portal) {
|
||||
for priority, portal := range portals {
|
||||
maxMessages := user.bridge.Config.Bridge.HistorySync.Immediate.MaxEvents
|
||||
initialBackfill := user.bridge.DB.Backfill.NewWithValues(user.MXID, database.BackfillImmediate, priority, &portal.Key, nil, maxMessages, maxMessages, 0)
|
||||
|
|
|
@ -1627,7 +1627,7 @@ func (portal *Portal) CreateMatrixRoom(user *User, groupInfo *types.GroupInfo, i
|
|||
|
||||
if user.bridge.Config.Bridge.HistorySync.Backfill && backfill {
|
||||
portals := []*Portal{portal}
|
||||
user.EnqueueImmedateBackfills(portals)
|
||||
user.EnqueueImmediateBackfills(portals)
|
||||
user.EnqueueDeferredBackfills(portals)
|
||||
user.BackfillQueue.ReCheck()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue