浏览代码

Update portalsByMXID when manually bridging

Tulir Asokan 2 年之前
父节点
当前提交
ff052d7f18
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      commands.go

+ 3 - 0
commands.go

@@ -751,6 +751,9 @@ func fnBridge(ce *WrappedCommandEvent) {
 	}
 	ce.ZLog.Debug().Str("channel_id", portal.Key.ChannelID).Msg("Bridging room")
 	portal.MXID = ce.RoomID
+	portal.bridge.portalsLock.Lock()
+	portal.bridge.portalsByMXID[portal.MXID] = portal
+	portal.bridge.portalsLock.Unlock()
 	portal.updateRoomName()
 	portal.updateRoomAvatar()
 	portal.updateRoomTopic()