Bug 1305645 - have the FxaPushService log information about push messages received. r?kitcambridge draft
authorMark Hammond <mhammond@skippinet.com.au>
Tue, 27 Sep 2016 17:42:12 +1000
changeset 417823 e63bcecce2353429ea9f94b8532dfe2b029f0f04
parent 416839 7de89737375306b0a64cea76c8118f96cfb66ade
child 532195 9661f82cd09faf085d0c7fa1ec46605e0b6cb022
push id30518
push userbmo:markh@mozilla.com
push dateTue, 27 Sep 2016 07:42:38 +0000
reviewerskitcambridge
bugs1305645
milestone52.0a1
Bug 1305645 - have the FxaPushService log information about push messages received. r?kitcambridge MozReview-Commit-ID: Jx21Jj92eu4
services/fxaccounts/FxAccountsPush.js
--- a/services/fxaccounts/FxAccountsPush.js
+++ b/services/fxaccounts/FxAccountsPush.js
@@ -153,19 +153,21 @@ FxAccountsPushService.prototype = {
    *
    * @private
    * @returns {Promise}
    */
   _onPushMessage(message) {
     this.log.trace("FxAccountsPushService _onPushMessage");
     if (!message.data) {
       // Use the empty signal to check the verification state of the account right away
+      this.log.debug("empty push message - checking account status");
       return this.fxAccounts.checkVerificationStatus();
     }
     let payload = message.data.json();
+    this.log.debug(`push command: ${payload.command}`);
     switch (payload.command) {
       case ON_DEVICE_DISCONNECTED_NOTIFICATION:
         return this.fxAccounts.handleDeviceDisconnection(payload.data.id);
         break;
       case ON_PASSWORD_CHANGED_NOTIFICATION:
       case ON_PASSWORD_RESET_NOTIFICATION:
         return this._onPasswordChanged();
         break;