tinycreative / react-native-intercom

React Native wrapper for Intercom.io
MIT License
405 stars 279 forks source link

'custom_attributes` does not work on Android #161

Closed ohtangza closed 5 years ago

ohtangza commented 6 years ago

Hello!

Symtom

When we call,

 Intercom.updateUser({
   email,
   custom_attributes: {
     custom_test: 'Testing...',
   },
});

The output of the above code is as follows:

screen shot 2018-01-10 at 10 12 13 am

I think the below line has some issue:

// https://github.com/tinycreative/react-native-intercom/blob/59d5cfe517fe0f15366343b21021f072db03dab4/android/src/main/java/com/robinpowered/react/Intercom/IntercomModule.java#L240
builder.withCustomAttributes((Map)value);

In the original documentation, it always uses builder.withCustomAttribute(). Do we have to use .withCustomAttribute() other than withCustomAttributes() do update custom_attribute?

Note

fryossi commented 6 years ago

custom_attributes works for me in both android/iOS