googlearchive / go-gcm

GCM library for Go.
Apache License 2.0
103 stars 66 forks source link

Support configuration of the xmppAddress #45

Open froodian opened 7 years ago

froodian commented 7 years ago

xmppAddress is currently defined as a constant (https://sourcegraph.com/github.com/google/go-gcm/-/blob/gcm.go#L42) - this prevents clients from specifying the pre-prod server at gcm-preprod.googleapis.com:5236, or (more importantly for my use-case) connecting to the newer fcm-xmpp.googleapis.com:5235

froodian commented 7 years ago

Note that to work with FCM, this requires separating xmppHost from xmppAddress as well (as the xmppUser should still be senderId + "@gcm.googleapis.com", per https://firebase.google.com/docs/cloud-messaging/server)