Skip to content

Commit 26b9aba

Browse files
router: ignore messages for unknown conferences
1 parent 271996a commit 26b9aba

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pkg/router.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,12 @@ func (r *Router) handleMatrixEvent(evt *event.Event) {
118118
return
119119
}
120120

121+
// All other events are expected to be handled by the existing conference.
122+
if conference == nil {
123+
logger.Warnf("ignoring %s since the conference is unknown", evt.Type.Type)
124+
return
125+
}
126+
121127
// A helper function to deal with messages that can't be sent due to the conference closed.
122128
// Not a function due to the need to capture local environment.
123129
sendToConference := func(eventContent conf.MessageContent) {

0 commit comments

Comments
 (0)