Bug 1622607 - Follow-up: Protocol options in the chat account wizard are not getting saved in the account manager. r=clokep
authorKhushil Mistry <khushil324@gmail.com>
Tue, 24 Mar 2020 21:52:03 -0400
changeset 29058 6638944e18bade042c5abc847a13097c85c55c44
parent 29057 2bf83584b702a24c5c9f6dcba8f6675ae1e6337e
child 29059 fb7372b0b4f73436f03d02908dbc954e9a48bc77
push id17181
push userthunderbird@calypsoblue.org
push dateWed, 25 Mar 2020 01:59:23 +0000
treeherdercomm-central@58f8cf2d8089 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersclokep
bugs1622607
Bug 1622607 - Follow-up: Protocol options in the chat account wizard are not getting saved in the account manager. r=clokep
mail/components/im/IMIncomingServer.jsm
mail/components/im/content/imAccountWizard.js
--- a/mail/components/im/IMIncomingServer.jsm
+++ b/mail/components/im/IMIncomingServer.jsm
@@ -198,23 +198,23 @@ IMIncomingServer.prototype = {
     }
     if (this._defaultOptionValues) {
       return this._defaultOptionValues[aPrefName];
     }
 
     this._defaultOptionValues = {};
     for (let opt of this.imAccount.protocol.getOptions()) {
       let type = opt.type;
-      if (type == opt.typeBool) {
+      if (type == Ci.prplIPref.typeBool) {
         this._defaultOptionValues[opt.name] = opt.getBool();
-      } else if (type == opt.typeInt) {
+      } else if (type == Ci.prplIPref.typeInt) {
         this._defaultOptionValues[opt.name] = opt.getInt();
-      } else if (type == opt.typeString) {
+      } else if (type == Ci.prplIPref.typeString) {
         this._defaultOptionValues[opt.name] = opt.getString();
-      } else if (type == opt.typeList) {
+      } else if (type == Ci.prplIPref.typeList) {
         this._defaultOptionValues[opt.name] = opt.getListDefault();
       }
     }
     return this._defaultOptionValues[aPrefName];
   },
 
   // the "Char" type will be used only for "imAccount" and internally.
   setCharValue(aPrefName, aValue) {
--- a/mail/components/im/content/imAccountWizard.js
+++ b/mail/components/im/content/imAccountWizard.js
@@ -353,24 +353,24 @@ var accountWizard = {
     if (this.alias) {
       acc.alias = this.alias;
     }
 
     for (let i = 0; i < this.prefs.length; ++i) {
       let option = this.prefs[i];
       let opt = option.opt;
       switch (opt.type) {
-        case opt.typeBool:
+        case Ci.prplIPref.typeBool:
           acc.setBool(option.name, option.value);
           break;
-        case opt.typeInt:
+        case Ci.prplIPref.typeInt:
           acc.setInt(option.name, option.value);
           break;
-        case opt.typeString:
-        case opt.typeList:
+        case Ci.prplIPref.typeString:
+        case Ci.prplIPref.typeList:
           acc.setString(option.name, option.value);
           break;
         default:
           throw new Error("unknown type");
       }
     }
     var autologin = this.getValue("connectNow");
     acc.autoLogin = autologin;