React-native-onesignal: OneSignal.logoutEmail still receives notification directed to registered email

Created on 9 Jun 2020  路  5Comments  路  Source: OneSignal/react-native-onesignal

Description:

In my app I use OneSignal's setEmail, at logout the logoutEmail function does not work. Even after calling her, I still receive notifications directed to the registered email

Environment

node: 10.16.3
yarn: 1.22.4
react-native: 0.60.4
react-native-onesignal: 3.7.3

Steps to Reproduce Issue:

  • After successful configuration of OneSignal, setEmail at login

  • Test with notification directed to the logged email
  • Call OneSignal.logoutEmail, as per the documentation at logout
  • Send targeted notification to email
  • (crash stacktraces, as well as any other information here)

    Possible Bug

    All 5 comments

    Howdy,
    Thank you for letting us know. We will look into this issue.

    In the meantime, an alternative is you can set and unset the email as a tag.

    Duplicate of https://github.com/OneSignal/OneSignal-Flutter-SDK/issues/239

    To clarify, are you seeing this issue in Android or iOS or both? @marcoskoch

    Thanks

    Hi @rgomezp, this situation occurs in both

    For visibility, I tested this using the RNOneSignal example app with the following metro bundler logs:

     LOG  Running "RNOneSignal" with {"rootTag":11,"initialProps":{}}
     LOG  Mounted!
     LOG  OneSignal permission: true
     LOG  Attempting to set email: [email protected]
     LOG  OneSignal: email subscription changed:  {"emailAddress": "[email protected]", "emailUserId": "336b180d-7e87-4c77-87cc-d0c3f3fa7737"}
     LOG  Success setting email: [email protected]
     LOG  Attempting to set external user id: ro2
     LOG  Results of setting external user id
     LOG  {"email": {"success": 1}, "push": {"success": 1}}
     LOG  Attempting to logout email
     LOG  OneSignal: email subscription changed:  {"emailAddress": null, "emailUserId": null}
    

    In the dashboard, I see the following:
    Screen Shot 2020-10-14 at 3 51 41 PM

    I haven't tested targeting the email after, but at least I can confirm there is currently no visible change occurring in the dashboard following calling the logoutEmail function.

    Howdy y'all,
    This issue should now be resolved. If you are still encountering issues, please continue discussion in https://github.com/OneSignal/OneSignal-iOS-SDK/issues/768

    Enjoy!

    Was this page helpful?
    0 / 5 - 0 ratings