mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-12 06:52:25 +00:00
Bug 1088230 - Add backwards compatible registration payload to new rooms registration for Loop. r=Standard8
This commit is contained in:
parent
af26b19b38
commit
2e51d8ac49
@ -520,7 +520,13 @@ let MozLoopServiceInternal = {
|
||||
* @return {Promise}
|
||||
*/
|
||||
registerWithLoopServer: function(sessionType, pushUrls, retry = true) {
|
||||
return this.hawkRequest(sessionType, "/registration", "POST", { simplePushURLs: pushUrls})
|
||||
// create a registration payload with a backwards compatible attribute (simplePushURL)
|
||||
// that will register only the calls notification.
|
||||
let msg = {
|
||||
simplePushURL: pushUrls.calls,
|
||||
simplePushURLs: pushUrls
|
||||
};
|
||||
return this.hawkRequest(sessionType, "/registration", "POST", msg)
|
||||
.then((response) => {
|
||||
// If this failed we got an invalid token. storeSessionToken rejects
|
||||
// the gRegisteredDeferred promise for us, so here we just need to
|
||||
|
Loading…
x
Reference in New Issue
Block a user