Technically corrects the hangup button in the widget, should be more precise though

This commit is contained in:
Gigiaj 2025-05-27 01:14:42 -05:00
parent 78dcdfda95
commit 39b20c7cc7

View file

@ -254,7 +254,17 @@ export function CallProvider({ children }: CallProviderProps) {
logger.debug(`CallContext: Hang up called.`);
activeClientWidgetApi?.transport.send(`${WIDGET_HANGUP_ACTION}`, {});
},
[activeCallRoomId, activeClientWidgetApi?.transport, isCallActive, isPrimaryIframe, lastViewedRoomDuringCall, setActiveClientWidgetApi, setViewedCallRoomId, shouldFlipIframe, viewedCallRoomId]
[
activeCallRoomId,
activeClientWidgetApi?.transport,
isCallActive,
isPrimaryIframe,
lastViewedRoomDuringCall,
setActiveClientWidgetApi,
setViewedCallRoomId,
shouldFlipIframe,
viewedCallRoomId,
]
);
useEffect(() => {
@ -282,7 +292,8 @@ export function CallProvider({ children }: CallProviderProps) {
ev.preventDefault();
if (ev.detail.widgetId === activeClientWidgetApi?.widget.id) {
activeClientWidgetApi?.transport.reply(ev.detail, {});
setIsCallActive(false);
hangUp();
//setIsCallActive(false);
}
logger.debug(
`CallContext: Received hangup action from widget in room ${activeCallRoomId}.`,