mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-28 17:23:09 -06:00
Avoid crash on non-compiled room regex
Roughly fixes #1845 (actual compiling still needed) Signed-off-by: Bohdan Horbeshko <bodqhrohro@gmail.com>
This commit is contained in:
parent
d6e9b7b307
commit
4370261055
|
|
@ -101,7 +101,7 @@ func (a *ApplicationService) IsInterestedInRoomID(
|
||||||
) bool {
|
) bool {
|
||||||
if namespaceSlice, ok := a.NamespaceMap["rooms"]; ok {
|
if namespaceSlice, ok := a.NamespaceMap["rooms"]; ok {
|
||||||
for _, namespace := range namespaceSlice {
|
for _, namespace := range namespaceSlice {
|
||||||
if namespace.RegexpObject.MatchString(roomID) {
|
if namespace.RegexpObject != nil && namespace.RegexpObject.MatchString(roomID) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue