-
Notifications
You must be signed in to change notification settings - Fork 2
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
missing provided and formatter function #3
Comments
Hi, First of all the provider function, as reported in the DOC,
always expects to have the userAlias (Bandyer) as the parameter of the return object. So the change I recommend making is the implementation of a fallback logic in such a way (being the object static and not complete) that you don't risk having an empty user interface. So try to use the following code, I've tested the behavior and works as expected
|
The provider and the formatter functions are ignored.
Following the initialization code :
`
var users = {
"acasolla" : {
userAlias: "acasolla",
firstName: "Alessandro",
lastName: "Casolla",
image: "",
formattedName : "Alessandro Casolla"
},
"guest" : {
userAlias: "guest",
firstName: "John",
lastName: "Doe",
image: "",
formattedName : "John Doe"
}
}
function yourFormatterFunction(user){
return user.firstName + " " + user.lastName;
}
Client = await BandyerChat.create({
userAlias: 'acasolla',
appId: 'xxx',
environment: 'sandbox',
hidden: true,
mode : "embed",
userDetailsProvider: yourProviderFunction,
userDetailsFormatter: yourFormatterFunction
});
`
My expectation is that the agent and the customer receives detailed information about the participant, but always get the username.
The text was updated successfully, but these errors were encountered: