-
Notifications
You must be signed in to change notification settings - Fork 247
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(fcm): correct the iidEndpoint endpoints used for topic management #335
Conversation
74bda9f
to
63cc148
Compare
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 PR. Both these URL patterns (/v1/:suffix
and /v1:suffix
) resolve to the same endpoint. So there's no actual bug here. Although I do prefer the /v1:suffix
format, since that's what's documented.
And please change the base branch of the PR to dev
. We don't merge to master
directly.
messaging/topic_mgt.go
Outdated
iidEndpoint = "https://iid.googleapis.com/iid/v1" | ||
iidSubscribe = ":batchAdd" | ||
iidUnsubscribe = ":batchRemove" | ||
iidEndpoint = "https://iid.googleapis.com/iid" |
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.
Instead of this, let's change how the URL is constructed in the makeTopicManagementRequest()
function.
iidSubscribe = "batchAdd"
iidUnsubscribe = "batchRemove"
fmt.Sprintf("%s:%s", c.iidEndpoint, req.op)
This will cause a test failure, so we need to update the tests too.
fe513b8
to
a5e5cf5
Compare
According to the document https://developers.google.com/instance-id/reference/server, the endpoints should be: https://iid.googleapis.com/iid/v1:batchAdd https://iid.googleapis.com/iid/v1:batchRemove NOT: https://iid.googleapis.com/iid/v1/:batchAdd https://iid.googleapis.com/iid/v1/:batchRemove
a5e5cf5
to
3303464
Compare
Thank you for reviewing my PR. I have changed the base branch to dev, and fix the tests and the I am not sure that both
However when requesting to
Another question, is there any plan to support the |
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. Thanks @rueian for the PR.
* chore: Removed Travis CI integration (#326) * chore: Added Actions-based release workflow (#331) * chore: Added Actions-based release workflow * Set GOPATH * Fixed working directory for tests * Decrypting credentials into the testdata directory * Added preflight and post check scripts * chore: Running CI workflow on pull_request (#338) * fix(fcm): correct the iidEndpoint endpoints used for topic management (#335) According to the document https://developers.google.com/instance-id/reference/server, the endpoints should be: https://iid.googleapis.com/iid/v1:batchAdd https://iid.googleapis.com/iid/v1:batchRemove NOT: https://iid.googleapis.com/iid/v1/:batchAdd https://iid.googleapis.com/iid/v1/:batchRemove * fix(fcm): Fix documents of FCM batch request limit (#347) Co-authored-by: Hiranya Jayathilaka <hiranya911@gmail.com> * fix: Deferring credential loading until required (#361) * Bumped version to 3.12.1 (#363) * chore: Specifying correct working directory for staging command (#365) Co-authored-by: Rueian <rueiancsie@gmail.com> Co-authored-by: 178inaba <178inaba.git@gmail.com>
According to the document https://developers.google.com/instance-id/reference/server,
the endpoints should be:
https://iid.googleapis.com/iid/v1:batchAdd
https://iid.googleapis.com/iid/v1:batchRemove
NOT:
https://iid.googleapis.com/iid/v1/:batchAdd
https://iid.googleapis.com/iid/v1/:batchRemove
RELEASE NOTE: Updated the remote endpoint used by the topic management operations.