-
Notifications
You must be signed in to change notification settings - Fork 13
feat: Add support to forward SubscriptionGroupIds #181
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: Add support to forward SubscriptionGroupIds #181
Conversation
| } | ||
|
|
||
| private fun getSubscriptionGroupIds(subscriptionGroupMap: String): MutableMap<String, String> { | ||
| val subscriptionGroupsArray = JSONArray(subscriptionGroupMap) |
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.
| val subscriptionGroupsArray = JSONArray(subscriptionGroupMap) | |
| if (subscriptionGroupMap.isEmpty()) { | |
| return subscriptionGroupIds | |
| } | |
| val subscriptionGroupsArray = JSONArray(subscriptionGroupMap) |
Check if the map string is empty before creating the JSON array, so you can avoid a JSONException
| subscriptionGroupIds[key] = value | ||
| } | ||
|
|
||
| return subscriptionGroupIds |
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.
| return subscriptionGroupIds | |
Not needed because the code already returns subscriptionGroupIds above.
| } else { | ||
| Logger.warning( | ||
| "unable to set Subscription Group ID for user attribute: " | ||
| + key + "due to invalid value data type. expected value data type should be Boolean" |
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.
| + key + "due to invalid value data type. expected value data type should be Boolean" | |
| + key + " due to invalid value data type. expected value data type should be Boolean" |
Mansi-mParticle
left a comment
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
22a9786
into
mparticle-integrations:development
Summary
Testing Plan
Reference Issue (For mParticle employees only. Ignore if you are an outside contributor)