diff --git a/src/github.com/matrix-org/dendrite/roomserver/query/query.go b/src/github.com/matrix-org/dendrite/roomserver/query/query.go index 6d3be2037..7f8da9bf1 100644 --- a/src/github.com/matrix-org/dendrite/roomserver/query/query.go +++ b/src/github.com/matrix-org/dendrite/roomserver/query/query.go @@ -365,6 +365,10 @@ func (r *RoomserverQueryAPI) QueryServerAllowedToSeeEvent( } _, domain, err := gomatrixserverlib.SplitID('@', *stateKey) + if err != nil { + continue + } + if domain == request.ServerName { isInRoom = true break