Closed queengooborg closed 4 years ago
@vinyldarkscratch Thanks for your issue. It seems like this is expected behaviour. As mentioned all the possible attributes that are given on https://developers.intercom.com/installing-intercom/docs/javascript-api-attributes-objects will be typed camel cased.
Will add the bug label until #17 gets fixed.
I feel that it would make sense to allow for snake casing (either allowing both or solely going for snake casing) for the primary reason that Intercom's built-in variables are all snake cased. Another part is probably that the docs don't make it particularly clear that the props have to be camel-cased -- the part stating "No need to pass the props with snake_cased keys" has implication that snake casing is allowed.
Since we're now depending on this module for our project, I'll see if I can get something written up in a PR!
During migration from
react-intercom
, we ran into another little issue with variable names. As described, all of Intercom's default props are camel cased, however there are implications that snake casing is allowed. However, when I tried to passuser_hash
, it apparently was not passed to Intercom. It seems that inmapDataAttributesToRawDataAttributes()
,user_hash
is overwritten by whateveruserHash
is.