Hello,
I am not sure if I’m missing something but I encountered a bizzare behaviour using Intercom classes when trying to login an Identified user.
Preface: I’m using Qt for Android and integrating Intercom purely on the Android side.
In my login function, I get passed user attributes from downstream. These include base attributes as well as additional custom attributes.
In the end I end up with something like.
UserAttributes userAttributes = builder.build();
Log.i(TAG, "Intercom login userattributes: " + userAttributes.toString());
Which prints out:
I MyIntercom: Intercom login userattributes: UserAttributes{attributes={name=Last, First, email=email@provider.com, userId=001abc}, customAttributes={attr1=value1}, companies=c]}
Then I tried to create a Registration class to perform login as:
Registration registration = Registration.create().withUserAttributes(userAttributes);
But this registration class does not have email nor userId populated? I already called the withEmail() and withUserId() methods on the user attributes object. Am I supposed to check the object and depending what’s inside call these methods again on the registration object? What is the purpose of doing this twice if the base user attributes just get ignored?
Please let me know what is the suggested workaround for this.
Best,
Stefan