Open rakeshorbonix opened 5 years ago
We are looking into this and will keep you updated.
Hi @rakeshorbonix
Is the code you mentioned previously for "Freshchat.updateUser" working for you?
(window as any).Freshchat.updateUser({ "firstName" : "Hello", "lastName" : "", "email" : "test@gmail.com", "countryCode" : "+91", "externalId": "12345678", });
Update user info. Accepts a JSON with the following format { "firstName" : "John", "lastName" : "Doe" "email" : "johndoe@dead.man", "countryCode" : "+91", "phoneNumber" : "1234234123" }
Can I check that getRestoreId is the function that should be called to restore chats from other devices?
Ed
We have update the Restore Id listener. Please refer this README docs for Restore Id.
getRestoreID for phonegap is not returning anything. can you help me ? showSupportChat = function() { //console.log("showsupportchat"); // (window as any).Freshchat.clearUserData(); var details = JSON.parse(window.localStorage.getItem("user_detail")); //console.log(details['uid']); (window as any).Freshchat.updateUser({ "firstName" : "Hello", "lastName" : "", "email" : "test@gmail.com", "countryCode" : "+91", "externalId": "12345678", }); alert((window as any).Freshchat.getRestoreId());
// var getRestoreID = "hello"; // (window as any).Freshchat.getRestoreID({ // getRestoreID = (window as any).Freshchat.getUser().getRestoreId(); // }); // // console.log(getRestoreID); //(window as any).Freshchat.setExternalID("12345678"); //(window as any).Freshchat.setRestoreID("12345678");
(window as any).Freshchat.showConversations(); (window as any).Freshchat.identifyUser("12345678", null); var restoreId = (window as any).Freshchat.getUser().getRestoreId();
};
I am using this in ionic 3 . But "(window as any).Freshchat.getRestoreId()" is returning nothing.