Bug 1622607 - Follow-up: Protocol options in the chat account wizard are not getting saved in the account manager. r=clokep a=wsmwk THUNDERBIRD_75_0b2_BUILD1 THUNDERBIRD_75_0b2_RELEASE
authorKhushil Mistry <khushil324@gmail.com>
Tue, 24 Mar 2020 21:52:03 -0400
changeset 37556 e75b83b80792df1a5326e0ba8927e91cf2fed75a
parent 37555 9e5d4c565ea0451f5a20006b386f3558448e7df0
child 37557 527761667dc9be61b268437c8a821b3e7ab11178
push id2574
push userthunderbird@calypsoblue.org
push dateWed, 25 Mar 2020 16:02:28 +0000
treeherdercomm-beta@e75b83b80792 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersclokep, wsmwk
bugs1622607
Bug 1622607 - Follow-up: Protocol options in the chat account wizard are not getting saved in the account manager. r=clokep a=wsmwk
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;