TP-55555 | cybertron integration longhorn

This commit is contained in:
varnit goyal
2024-11-06 09:51:40 +05:30
parent c005a2532a
commit cf79721353
2 changed files with 3 additions and 2 deletions

View File

@@ -78,11 +78,11 @@ function extractUserCallModelUpdatedPush(rawResponse) {
sendCallStatusMessage(res);
}
if (jsonData?.pushType === pushResponseTypes.UserCallModelUpdatedPush) {
res = jsonData;
sendCallStatusMessage(res);
}
if(jsonData.pushType === pushResponseTypes.UserCCRuntimeUpdatedPush) {
const payload= jsonData?.data;
debugger;
//handle ameyo erroronous condition
if (payload?.isOnBreak) {
window.postMessage({
@@ -94,7 +94,6 @@ function extractUserCallModelUpdatedPush(rawResponse) {
}
}
if(jsonData?.pushType == pushResponseTypes.UserLoggedOffPush) {
debugger;
const payload = jsonData?.data;
window.postMessage({
type: MessagingType.ON_AMEYO_FORCED_LOGOUT,

View File

@@ -155,11 +155,13 @@ class AmeyoAdapter implements IAdapter {
this.currentCallMetadata = {...this.currentCallMetadata, ...data?.data}
}
if(data?.type === MessagingType.ON_AMEYO_AGENT_ON_BREAK) {
debugger;
console.log('on availability changed')
this.isAgentAvailable = false;
this.callbacks.onAgentAvailabilityChange(false);
}
if(data?.type === MessagingType.ON_AMEYO_FORCED_LOGOUT){
debugger;
this.callbacks.onForcedLogout()
}
};