Selaa lähdekoodia

Send backfilling bridge state again

Tulir Asokan 3 vuotta sitten
vanhempi
sitoutus
53eac40711
1 muutettua tiedostoa jossa 4 lisäystä ja 0 poistoa
  1. 4 0
      historysync.go

+ 4 - 0
historysync.go

@@ -61,7 +61,11 @@ func (c conversationList) Swap(i, j int) {
 
 func (user *User) handleHistorySyncsLoop() {
 	for evt := range user.historySyncs {
+		go user.sendBridgeState(BridgeState{StateEvent: StateBackfilling})
 		user.handleHistorySync(evt.Data)
+		if len(user.historySyncs) == 0 && user.IsConnected() {
+			go user.sendBridgeState(BridgeState{StateEvent: StateConnected})
+		}
 	}
 }