@@ -95,26 +95,21 @@ func (r *Router) handleMatrixEvent(evt *event.Event) {
9595 // Only ToDeviceCallInvite events are allowed to create a new conference, others
9696 // are expected to operate on an existing conference that is running on the SFU.
9797 if conference == nil && evt .Type .Type == event .ToDeviceCallInvite .Type {
98- if evt .Type .Type == event .ToDeviceCallInvite .Type {
99- logger .Infof ("creating new conference %s" , conferenceID )
100- conferenceSink , err := conf .StartConference (
101- conferenceID ,
102- r .config ,
103- r .matrix .CreateForConference (conferenceID ),
104- createConferenceEndNotifier (conferenceID , r .channel ),
105- evt .Sender ,
106- evt .Content .AsCallInvite (),
107- )
108- if err != nil {
109- logger .WithError (err ).Errorf ("failed to start conference %s" , conferenceID )
110- return
111- }
112-
113- r .conferenceSinks [conferenceID ] = conferenceSink
98+ logger .Infof ("creating new conference %s" , conferenceID )
99+ conferenceSink , err := conf .StartConference (
100+ conferenceID ,
101+ r .config ,
102+ r .matrix .CreateForConference (conferenceID ),
103+ createConferenceEndNotifier (conferenceID , r .channel ),
104+ evt .Sender ,
105+ evt .Content .AsCallInvite (),
106+ )
107+ if err != nil {
108+ logger .WithError (err ).Errorf ("failed to start conference %s" , conferenceID )
114109 return
115110 }
116111
117- logger . Warnf ( "ignoring %s since the conference is unknown" , event . ToDeviceCallInvite . Type )
112+ r . conferenceSinks [ conferenceID ] = conferenceSink
118113 return
119114 }
120115
0 commit comments