mirror of
https://github.com/tulir/mautrix-whatsapp
synced 2024-10-31 20:08:55 +01:00
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() {
|
switch evt.GetSyncType() {
|
||||||
case waProto.HistorySync_INITIAL_BOOTSTRAP:
|
case waProto.HistorySync_INITIAL_BOOTSTRAP:
|
||||||
// Enqueue immediate backfills for the most recent messages first.
|
// Enqueue immediate backfills for the most recent messages first.
|
||||||
user.EnqueueImmedateBackfills(portals)
|
user.EnqueueImmediateBackfills(portals)
|
||||||
case waProto.HistorySync_FULL, waProto.HistorySync_RECENT:
|
case waProto.HistorySync_FULL, waProto.HistorySync_RECENT:
|
||||||
user.EnqueueForwardBackfills(portals)
|
user.EnqueueForwardBackfills(portals)
|
||||||
// Enqueue deferred backfills as configured.
|
// Enqueue deferred backfills as configured.
|
||||||
|
@ -420,7 +420,7 @@ func getConversationTimestamp(conv *waProto.Conversation) uint64 {
|
||||||
return convTs
|
return convTs
|
||||||
}
|
}
|
||||||
|
|
||||||
func (user *User) EnqueueImmedateBackfills(portals []*Portal) {
|
func (user *User) EnqueueImmediateBackfills(portals []*Portal) {
|
||||||
for priority, portal := range portals {
|
for priority, portal := range portals {
|
||||||
maxMessages := user.bridge.Config.Bridge.HistorySync.Immediate.MaxEvents
|
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)
|
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 {
|
if user.bridge.Config.Bridge.HistorySync.Backfill && backfill {
|
||||||
portals := []*Portal{portal}
|
portals := []*Portal{portal}
|
||||||
user.EnqueueImmedateBackfills(portals)
|
user.EnqueueImmediateBackfills(portals)
|
||||||
user.EnqueueDeferredBackfills(portals)
|
user.EnqueueDeferredBackfills(portals)
|
||||||
user.BackfillQueue.ReCheck()
|
user.BackfillQueue.ReCheck()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue