-
Notifications
You must be signed in to change notification settings - Fork 2
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(NotificationUtils): Encode user email to retrieve push devices. #202
Conversation
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
@@ -327,7 +329,7 @@ public static int getPushInfo(String toUser) { | |||
try { | |||
Map<String, String> headers = Map.of("Accept", "application/json"); | |||
var httpResponse = HttpUtils.httpRequestRawResponse( | |||
URI.create(PUSH_API_URL + "/devices/get?api_key=" + PUSH_API_KEY + "&user=" + toUser), | |||
URI.create(getPushDevicesUrl(PUSH_API_URL + "/devices/get?api_key=" + PUSH_API_KEY + "&user=", toUser)), |
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. This might now benefit from a String.format?
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.
Good idea, done in 0e8ba24.
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.
Can't test this but code looks good!
Checklist
dev
before they can be merged tomaster
)Description
Changes from this PR include correctly encoding a user's email address before retrieving the number of push devices.