codemotionapps/react-native-help-scout

opening article doesn't perform any action

danipralea opened this issue · 2 comments

Hello guys.

I am doing the init of beacon, I'm identifying the user after login and I'm opening the article with the designated article id, but at this point nothing happens (attaching the code)

// Initialize Beacon
  private _initializeBeacon = (user: User) => {
    if (user.is_patient) {
      Beacon.init('87fb71a2-026d-461d-8c9b-fc812985de19');
    } else {
      Beacon.init('ffef5f82-f9b4-4724-a280-b2c288f48517');
    }

    Beacon.identify({
      email: user.email,
      name: user.full_name
    });
  };
const HelpScoutScreen = (props: IProps) => {
  useEffect(() => {
    console.log('help scout hash : ', props.currentUser.helpscout_hash); // it prints `help scout hash :  fbe6ee3c9d103e8fb6c0e18aacf71c02e6b931f9f60596236be99a776bbeec80`, so I actually have a value here as well
    Beacon.openArticle(props.currentUser.helpscout_hash);
  }, []);

  return <View />;
};

Is there something I can do about it? or something I'm missing out?

Thanks in advance,
Dan.

This doesn't look right. Here's an article ID from our Help Scout docs: 5c9218460428633d2cf3d222, it's a lot shorter.
Here's where I got it from:
image

apparently I was setting it up incorrectly. Beacon.open() did the trick.
Thanks!