historysync: fix typo

Signed-off-by: Sumner Evans <sumner@beeper.com>
This commit is contained in:
Sumner Evans 2022-11-10 10:07:08 -07:00
parent f8a6afd66e
commit f51fb5c5c2
No known key found for this signature in database
GPG key ID: 8904527AB50022FD
2 changed files with 3 additions and 3 deletions

View file

@ -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)

View file

@ -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()
}