-
Notifications
You must be signed in to change notification settings - Fork 736
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
feat(ask-sdk-core/util) Add new helper function to get user id #546
Conversation
👍 |
@@ -43,7 +44,7 @@ describe('RequestEnvelopeUtils', () => { | |||
templateVersion : '1.0', | |||
markupVersion : '1.0', | |||
}, | |||
}; | |||
};requestEnvelope.context.System.user.userId = 'mockUserId' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please write this one in a new line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the feedback!
I've fixed it :)
Hi @hideokamoto The code looks good. Before I merge it in, could you please modify the commit name to "feat: add getUserId util function", In order to fit conventional commits structure. Thanks, |
feat(docs) add getUserId into the docs fix(ask-sdk-core) lint error of getUserId fix[ask-sdk-core] make a new line to define the user id
7260ebb
to
1d85349
Compare
I've rebased my commits. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, @hideokamoto Thanks for the PR! Merging this in. It will be included in the next SDK release. Regards, |
We can get user id from the SDK.
Description
Add the
getUserId
function into the utils.We can get the user id more easier.
Motivation and Context
Now we can get the requested user's device id by the SDK.
But we want to get the user id too.
Before
Our code will be too long line :(
After
It is the simplest way to get the user ID :)
Testing
To run unit test by gulp.
Screenshots (if appropriate)
Types of changes
Checklist
License