helpcrunch / android-sdk-demo

Public demo for HelpCrunch Android SDK
Apache License 2.0
9 stars 1 forks source link

userId is not set in v.2.0.3 #14

Closed yoldar closed 4 years ago

yoldar commented 4 years ago

I have updated from 2.0.1 to 2.0.3 and HelpCrunch stopped to receive userId.

HCUser user = new HCUser.Builder().withUserId(userId).build(); HelpCrunch.updateUser(user);

P.s. This is options: HCTheme theme = new HCTheme.Builder(R.color.support_color, true).build(); HCPreChatForm preChatForm = new HCPreChatForm.Builder().withName(true).withPhone(true).build(); HCOptions options = new HCOptions.Builder().setTheme(theme).setPreChatForm(preChatForm).build(); HelpCrunch.showChatScreen(this, options);

TalbotGooday commented 4 years ago

Hello. Thanks for the report! Sorry, I cannot reproduce this error. :c How do you check that the userId is not saved?

yoldar commented 4 years ago

Hello. Thanks for the report! Sorry, I cannot reproduce this error. :c How do you check that the userId is not saved?

Hi! Actually I got this bug on production app. You can try firstly call:

HCUser user = new HCUser.Builder().withUserId(userId).build();
HelpCrunch.updateUser(user);

and then show chat with phone and name required: HCPreChatForm.Builder().withName(true).withPhone(true).build();

And you can see that on 2.0.1 name and phone will be not asked to enter because you set userId. On 2.0.3 chat will ask you to enter phone and name. Than you can check on HelpCrunch that user will have only name and phone but userId will be empty.

TalbotGooday commented 4 years ago

Oh, I got it. Thank you. I'll try

yoldar commented 4 years ago

Oh, I got it. Thank you. I'll try

Did you manage to reproduce?

TalbotGooday commented 4 years ago

Yes, I reproduced and fixed. It's already fixed in 2.0.4