I am using twilio for creating an chat API using conversion API (Twilio), I was able to create the converstaion and add new participant to the converstion, But when I try to add friendly name to participant, Its not adding.
client.conversations.conversations(conversionsSID)
.participants
.create({
identity: identity,
FriendlyName: name,
attributes: JSON.stringify({
profileImage: profileImage
})
}).then((participant) => {
resolve({ participant: participant, error: null })
}).catch((error) => {
reject({ participant: null, error: error });
});
I have tried with FriendlyName and friendly_name, both of that does't work.
The participant resource does not have a
FriendlyName
property. You can see the available properties that you can use in the documentation for creating a conversation participant.You are already using the
attributes
property to store a profile image, so you could use this to store your friendly name too. So, you could change your code to: