Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"type": "patch",
"area": "fix",
"workstream": "End call options",
"comment": "Only allow the user to end the call for everyone if they are acitvely in the call",
"packageName": "@azure/communication-react",
"email": "dmceachern@microsoft.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"type": "patch",
"area": "fix",
"workstream": "End call options",
"comment": "Only allow the user to end the call for everyone if they are acitvely in the call",
"packageName": "@azure/communication-react",
"email": "dmceachern@microsoft.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ export const CommonCallControlBar = (props: CommonCallControlBarProps & Containe
/* @conditional-compile-remove(teams-meeting-conference) */
const [showTeamsMeetingConferenceModal, setShowTeamsMeetingConferenceModal] = useState(false);

const adapterState = props.callAdapter.getState();
Comment thread
dmceachernmsft marked this conversation as resolved.
Outdated

/* @conditional-compile-remove(end-call-options) */
// If the hangup capability is not present, we default to true
const isHangUpForEveryoneAllowed =
Expand Down Expand Up @@ -469,7 +471,10 @@ export const CommonCallControlBar = (props: CommonCallControlBarProps & Containe
!props.mobileView &&
isHangUpForEveryoneAllowed &&
!isTeams && // Temporary disable it for Teams call, since capability does not give the right value
props.callControls?.endCallButton?.hangUpForEveryone === 'endCallOptions'
props.callControls?.endCallButton?.hangUpForEveryone === 'endCallOptions' &&
// Only show the end call menu when the call is connected, user should not be able to end the call for everyone
// when they are not actively in the call to communicate they will.
adapterState.call?.state === 'Connected'
}
/>
</ControlBar>
Expand Down