From 6f635a66fcc9b0019425d5783afa4fcb83649ff6 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Mon, 5 Dec 2022 18:04:21 +0200 Subject: [PATCH] Update bridge info after updating community space --- portal.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/portal.go b/portal.go index 6259357..b40f149 100644 --- a/portal.go +++ b/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 }