Explorar o código

Send backfilling bridge state again

Tulir Asokan %!s(int64=3) %!d(string=hai) anos
pai
achega
53eac40711
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  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})
+		}
 	}
 }