forked from github/cinny
Technically corrects the hangup button in the widget, should be more precise though
This commit is contained in:
@@ -254,7 +254,17 @@ export function CallProvider({ children }: CallProviderProps) {
|
|||||||
logger.debug(`CallContext: Hang up called.`);
|
logger.debug(`CallContext: Hang up called.`);
|
||||||
activeClientWidgetApi?.transport.send(`${WIDGET_HANGUP_ACTION}`, {});
|
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(() => {
|
useEffect(() => {
|
||||||
@@ -282,7 +292,8 @@ export function CallProvider({ children }: CallProviderProps) {
|
|||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
if (ev.detail.widgetId === activeClientWidgetApi?.widget.id) {
|
if (ev.detail.widgetId === activeClientWidgetApi?.widget.id) {
|
||||||
activeClientWidgetApi?.transport.reply(ev.detail, {});
|
activeClientWidgetApi?.transport.reply(ev.detail, {});
|
||||||
setIsCallActive(false);
|
hangUp();
|
||||||
|
//setIsCallActive(false);
|
||||||
}
|
}
|
||||||
logger.debug(
|
logger.debug(
|
||||||
`CallContext: Received hangup action from widget in room ${activeCallRoomId}.`,
|
`CallContext: Received hangup action from widget in room ${activeCallRoomId}.`,
|
||||||
|
|||||||
Reference in New Issue
Block a user