Browse Source

Update bridge info after updating community space

Tulir Asokan 2 years ago
parent
commit
6f635a66fc
1 changed files with 3 additions and 2 deletions
  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
 }