Provide a separate pref to disable autojoins by default

NEW
Unassigned

Status

3 years ago
2 years ago

People

(Reporter: aleth, Unassigned)

Tracking

trunk

Details

(URL)

(Reporter)

Description

3 years ago
Setting accountsManager.notification.userDisabled to false by default (as Tor messenger intends to do, see the linked url) leads to warning messages in the account manager that are confusing to the user ("You have disabled automatic connections"). There should be a separate pref for this use case. If it is true, the “Sign-in on startup” checkbox in accounts might be better off hidden too.
(Reporter)

Comment 1

3 years ago
(In reply to aleth [:aleth] from comment #0)
> Setting accountsManager.notification.userDisabled

Sorry, pasted the string id instead. The pref is messenger.startup.action
https://dxr.mozilla.org/comm-central/source/chat/components/src/imAccounts.js#897

I assume that's what's being set at least? There's a command line flag that leads to the same result:
https://dxr.mozilla.org/comm-central/source/im/components/ibCommandLineHandler.js#20
Flags: needinfo?(arlolra)
Instead of adding yet another pref, can we detect that the pref has no user-set value?
(Reporter)

Comment 3

3 years ago
It would also be good to clarify what the intended behaviour is here. Do you wish to turn off automatic connection only at startup, or autojoins throughout?

Comment 4

3 years ago
> I assume that's what's being set at least?

Yes, see https://gitweb.torproject.org/tor-messenger-build.git/tree/projects/instantbird/preferences.patch#n134


> It would also be good to clarify what the intended behaviour is here. Do you
> wish to turn off automatic connection only at startup, or autojoins
> throughout?

Throughout, as a safeguard against unintentional presence leaks.

Hiding the checkboxes is good idea for us as well. Does it make sense to add a pref for this use case? feel free to decline.
Flags: needinfo?(arlolra)

Comment 5

2 years ago
In retrospect, a flag for something like this is probably all we'd want,


diff --git a/chat/components/src/imAccounts.js b/chat/components/src/imAccounts.js
index c13c6100d..5bfea57f2 100644
--- a/chat/components/src/imAccounts.js
+++ b/chat/components/src/imAccounts.js
@@ -588,7 +588,7 @@ imAccount.prototype = {
   },
 
   get autoLogin() {
-    let autoLogin = true;
+    let autoLogin = false;
     try {
       autoLogin = this.prefBranch.getBoolPref(kPrefAccountAutoLogin);
     } catch (e) { }
diff --git a/im/content/accountWizard.xul b/im/content/accountWizard.xul
index 5fa5b8293..f0933af7f 100644
--- a/im/content/accountWizard.xul
+++ b/im/content/accountWizard.xul
@@ -138,7 +138,7 @@
       <rows id="summaryRows"/>
     </grid>
     <separator/>
-    <checkbox id="connectAutomatically" label= "&accountSummary.connectAutomatically.label;" checked="true"/>
+    <checkbox id="connectAutomatically" label= "&accountSummary.connectAutomatically.label;" checked="false"/>
   </wizardpage>
 
 </wizard>
You need to log in before you can comment on or make changes to this bug.