소스 검색

Update bridge info after updating community space

Tulir Asokan 2 년 전
부모
커밋
6f635a66fc
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 2
      portal.go

+ 3 - 2
portal.go

@@ -1738,7 +1738,7 @@ func (portal *Portal) removeSpaceParentEvent(space id.RoomID) {
 	}
 }
 
-func (portal *Portal) updateCommunitySpace(user *User, add, updateDB bool) bool {
+func (portal *Portal) updateCommunitySpace(user *User, add, updateInfo bool) bool {
 	if add == portal.InSpace {
 		return false
 	}
@@ -1781,8 +1781,9 @@ func (portal *Portal) updateCommunitySpace(user *User, add, updateDB bool) bool
 		portal.log.Warnfln("Failed to send m.space.parent event to %s %s: %v", action, space.MXID, err)
 	}
 	portal.InSpace = add
-	if updateDB {
+	if updateInfo {
 		portal.Update(nil)
+		portal.UpdateBridgeInfo()
 	}
 	return true
 }