Browse Source

Send backfilling bridge state again

Tulir Asokan 3 năm trước cách đây
mục cha
commit
53eac40711
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  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})
+		}
 	}
 }