fayeed / flutter_freshchat

The unofficial flutter plugin for Freshchat
https://pub.dartlang.org/packages/flutter_freshchat
MIT License
32 stars 36 forks source link

How to generate restoreId in flutter fresh chat(getting empty string)? #25

Closed chaitanya-y closed 4 years ago

chaitanya-y commented 4 years ago

I checked some issues online.someone mentioned that restoreId will get generated only after first was sent.I tried to call send message function and then did identify user .Still, I am getting restoreId as empty string.

  FreshchatUser user = FreshchatUser.initail();
  user.email = email;
  user.firstName = firstName;
  user.lastName = lastName;
  user.phoneCountryCode = '91';
  user.phone = phone;
  bool result = await FlutterFreshchat.updateUserInfo(user: user);
  bool sendMessageSuccess =await FlutterFreshchat.send(message: 'Hello',tag: 'test');
  if(sendMessageSuccess){
  freshChatId = await FlutterFreshchat.identifyUser(externalID: phone, restoreID: null);
  print('freshChatId');
   }

and 2)Is there any way to trigger an event on the click of back button in the flutter chat screen.

fayeed commented 4 years ago

@chaitanya-y I have not been able to reproduce this issue I don't know what the reason is, there is already an open issue #11 you can try there also if this package doesn't work for you there is also one more package freshchat Its a forked repository of this repository.

Also one more thing please don't spam other issues if you don't receive a reply.

fayeed commented 4 years ago

@chaitanya-y you can also check this issue