Explorar o código

Merge pull request #469 from mautrix/sumner/bri-2852-3

historysync: fix backfill logic again
Sumner Evans %!s(int64=3) %!d(string=hai) anos
pai
achega
d2d9be7a68
Modificáronse 1 ficheiros con 1 adicións e 10 borrados
  1. 1 10
      historysync.go

+ 1 - 10
historysync.go

@@ -242,16 +242,7 @@ func (user *User) handleHistorySync(reCheckQueue chan bool, evt *waProto.History
 	// most recent portals. If it's the last history sync event, start
 	// backfilling the rest of the history of the portals.
 	if user.bridge.Config.Bridge.HistorySync.Backfill {
-		if evt.GetProgress() < 99 {
-			return
-		}
-
-		doneSyncType := waProto.HistorySync_RECENT
-		if user.bridge.Config.Bridge.HistorySync.RequestFullSync {
-			doneSyncType = waProto.HistorySync_FULL
-		}
-
-		if evt.GetSyncType() != waProto.HistorySync_INITIAL_BOOTSTRAP && evt.GetSyncType() != doneSyncType {
+		if evt.GetSyncType() != waProto.HistorySync_INITIAL_BOOTSTRAP && evt.GetProgress() < 98 {
 			return
 		}