Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide onesignalId within the user namespace #142

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ElwynVdb
Copy link

Overview

This pull request provides a getter function for onesignalId in the User namespace

Benefits

  • Provides a straightforward method to retrieve the onesignalId, enhancing code readability and maintainability.
  • Supports implementations where direct access to onesignalId is crucial, such as for personalized push notifications or user tracking.
  • Eliminates the need for developers to implement custom solutions for accessing the onesignalId, thereby reducing potential bugs and code redundancy.

@ElwynVdb ElwynVdb changed the title Export onesignal Provide onesignalId within the user namespace Apr 25, 2024
@veewee
Copy link

veewee commented May 3, 2024

@jkasten2 / @rgomezp

To give some context : this is what one currently needs to use in order to get the onesignal ID:

const oneSignalId = (window.OneSignal?.User as any)._currentUser.onesignalId;

Having to grab it from _currentUser doesn't seem like the way to go here.

Would this be something you are interested in merging?
Let us know if we can do anything to help you getting this into this repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants