You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 1, 2023. It is now read-only.
Here callUpdateFCPRofile(externalId, restoreId); method is calling multiple times due to which API is hitting multiple times. I checked with putting log observed that Freshchat.addEventListener is triggering multiple times when a new user initiating the chat (sending the first message).
Why it is triggering multiple times? it supposed to be triggered only one time.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hello Team,
Freshchat.addEventListener event is calling multiple times.
Below is the code snippet :
useEffect(() => {
Freshchat.addEventListener(Freshchat.EVENT_USER_RESTORE_ID_GENERATED, () => {
Freshchat.getUser((user) => {
const restoreId = user.restoreId;
const externalId = user.externalId;
try {
}, [currentPatient?.mobileNumber]);
Here callUpdateFCPRofile(externalId, restoreId); method is calling multiple times due to which API is hitting multiple times. I checked with putting log observed that Freshchat.addEventListener is triggering multiple times when a new user initiating the chat (sending the first message).
Why it is triggering multiple times? it supposed to be triggered only one time.
The text was updated successfully, but these errors were encountered: