-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding authentication check to fetch new token before endchat #390
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,9 @@ import { TelemetryManager } from "../../../common/telemetry/TelemetryManager"; | |
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
const prepareEndChat = async (props: ILiveChatWidgetProps, chatSDK: any, state: ILiveChatWidgetContext, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, setWebChatStyles: any, adapter: any) => { | ||
try { | ||
//Get new auth token again if chat continued for longer time, otherwise chatsdk throws 401 error for auth chats | ||
await handleAuthenticationIfEnabled(props, chatSDK); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If token is not expired, will this hurt performance? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes and No, Should we allow this PR to fix the breaking functionality and have another tracking item for perf improvement? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was reviewing the code again, if performance is a problem, then instead of introducing a new |
||
|
||
// Use Case: If call is ongoing, end the call by simulating end call button click | ||
endVoiceVideoCallIfOngoing(chatSDK, dispatch); | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update CHANGE_LOG please