chatwoot-react-native-widget
chatwoot-react-native-widget copied to clipboard
set user info not working
I pass user prop to ChatWootWidget, but it doesn't work. I still have to fill out the email in the form to start the conversation
My code
<ChatWootWidget
websiteToken={websiteToken}
locale={locale}
baseUrl={baseUrl}
closeModal={() => navigation.goBack()}
isModalVisible={true}
user={{
identifier: userInfo.email,
name: `${userInfo.name} ${userInfo.firstName}`,
avatar_url: '',
email: userInfo.email,
identifier_hash: 'xGNUWSCzHdMEmDrNm9CNoiGF',
}}
customAttributes={customAttributes}
colorScheme={colorScheme}
/>
Hi @nusjose and anyone who is having the same issue. Most likely it is caused by the identifier_hash, if it has value causes some kind of re-render and no value is shown on ChatWoot side. Explained here: https://github.com/chatwoot/chatwoot-react-native-widget/issues/35#issuecomment-1803242934. Temporary solution for me is not assigning any value to identifier_hash . If it's a must to add it, then use customAttributes for that