Closed alegeza closed 5 years ago
Currently We didn’t implement this feature in SDK, will be include this on Upcoming releases.
Hello, thanks a lot for your response.
I have one more question if you don't mind.
I am trying to get restoreId. According to documentation
Restore Id - This is generated by Freshchat for the current user, given an external id was set and can be retrieved anytime using the Freshchat.getUser().getRestoreId() API. The app is responsible for storing and later present the combination of external id and restore id to the Freshchat SDK to continue the chat conversations across sessions on same device or across devices and platforms.
Here's the snippet:
let userInfo = {
firstName: this.user.firstName,
lastName: this.user.lastName,
email: this.user.email
};
window.Freshchat.updateUser(JSON.stringify(userInfo));
let userProperties = {
user_id: this.user.id.toString(),
created_at: this.user.dateCreated.toString(),
organisation: this.user.organisation.name,
organisation_id: this.user.organisation.id.toString()
};
let platform = window.device.platform;
//Android accepts JSON string, but iOS - dictionary
window.Freshchat.updateUserProperties(platform === 'Android' ? JSON.stringify(userProperties) : userProperties);
window.Freshchat.setExternalID(this.user.username);
Then I am trying to get restore id and Freshchat always returns nil for iOS and empty string for Android.
Could you hint me what is wrong?
hi guys, any new on this in features or did you get this restoreId working?
I was trying to get restore id bt using below code but it returns always undefined.
getRestoreId(){
return (window as any).Freshchat.getRestoreID();
}
async asyncGetRestoreId(){
return (window as any).Freshchat.getRestoreID();
}
Please let me know if this approach is right or not or how I can get restore id or external id
We are looking into this and will keep you updated.
We have update the Restore Id listener. Please refer this README docs for restore chat history.
Hello,
I am using Apache Cordova plugin for Freshchat in Ionic 1 application. It is working fine, but I can't load the chat history.
I haven't found any functions to indetify user with restore id and external id. Could you tell me how to get the history of chat using the plugin?
Thanks