-
Notifications
You must be signed in to change notification settings - Fork 355
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
fix(contacts): handle optional scim fields #3827
Conversation
if (photos?.length) { | ||
avatarURL = photos[0].value; | ||
let sipAddresses; | ||
if (filteredContact[SCIM_WEBEXIDENTITY_USER]) { |
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.
Nit: Maybe we can use ternary operator here also.. but just a suggestion.
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.
@adhmenon the ternary operator doesn't work here. Something to do with the way typescript recognizes this object member. I initially tried with ternary but kept getting errors that SCIM_WEBEXIDENTITY_USER could be undefined.
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.
LGTM. Just a small minro comment.
This pull request is automatically being deployed by Amplify Hosting (learn more). |
COMPLETES # NA
This pull request addresses
Optional fields in the SCIM API response. Not all contacts will have all the fields populated and the SCIM API mandates only 3 mandatory fields. This causes a crash in our code.
by making the following changes
Mark all fields except 3 mandatory ones as optional. Handle contact resolution logic accordingly.
Added new UTs to test this optional field logic in the resolution.
Change Type
The following scenarios where tested
I certified that
I have read and followed contributing guidelines
I discussed changes with code owners prior to submitting this pull request
I have not skipped any automated checks
All existing and new tests passed
I have updated the documentation accordingly
Make sure to have followed the contributing guidelines before submitting.