bridgev2/portal: don't try to update functional members if portal doesn't exist

This commit is contained in:
Tulir Asokan 2025-12-07 19:52:22 +02:00
commit 00c58efc59

View file

@ -2427,7 +2427,7 @@ func (portal *Portal) handleRemoteEvent(ctx context.Context, source *UserLogin,
}
func (portal *Portal) ensureFunctionalMember(ctx context.Context, ghost *Ghost) {
if !ghost.IsBot || portal.RoomType != database.RoomTypeDM || portal.OtherUserID == ghost.ID {
if !ghost.IsBot || portal.RoomType != database.RoomTypeDM || portal.OtherUserID == ghost.ID || portal.MXID == "" {
return
}
ars, ok := portal.Bridge.Matrix.(MatrixConnectorWithArbitraryRoomState)