From 181b43e0f832efeabb4d82f4500484e76e7b6a62 Mon Sep 17 00:00:00 2001 From: Nick Mills-Barrett Date: Tue, 15 Mar 2022 20:30:33 +0000 Subject: [PATCH] Run message history backfill after creating all the rooms Possible workaround for issue as described here: https://github.com/matrix-org/synapse/issues/9424#issuecomment-1068351755 --- historysync.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/historysync.go b/historysync.go index 5fece971..c71ce288 100644 --- a/historysync.go +++ b/historysync.go @@ -90,10 +90,10 @@ func (user *User) handleHistorySync(evt *waProto.HistorySync) { var backfillWait sync.WaitGroup backfillWait.Add(1) - go user.backfillLoop(portalsToBackfill, backfillWait.Done) for _, conv := range conversations { user.handleHistorySyncConversation(conv, portalsToBackfill) } + go user.backfillLoop(portalsToBackfill, backfillWait.Done) close(portalsToBackfill) backfillWait.Wait() user.log.Infoln("Finished handling history sync with", description)