Skip to content

Commit

Permalink
Merge pull request #7707 from vector-im/mauroromito/end_call_when_del…
Browse files Browse the repository at this point in the history
…eting_widget
  • Loading branch information
Velin92 authored Nov 7, 2023
2 parents e7a93de + f759ce4 commit 2bae2c9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Riot/Managers/Widgets/WidgetManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,13 @@ - (void)addMatrixSession:(MXSession *)mxSession

// Broadcast the generic notification
[[NSNotificationCenter defaultCenter] postNotificationName:kWidgetManagerDidUpdateWidgetNotification object:widget];
// End jitsi call if a active call exists and widget has been updated to not be active
if ([[AppDelegate theDelegate].callPresenter.jitsiVC.widget.widgetId isEqualToString: widget.widgetId] &&
[[AppDelegate theDelegate].callPresenter.jitsiVC.widget.roomId isEqualToString: event.roomId] &&
!widget.isActive)
{
[[AppDelegate theDelegate].callPresenter endActiveJitsiCall];
}
}
else
{
Expand Down
1 change: 1 addition & 0 deletions changelog.d/7706.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
If a Jitsi call in a room is ongoing when the Jitsi widget is removed from such room the call ends.

0 comments on commit 2bae2c9

Please sign in to comment.