diff --git a/chat/chat-prefs.js b/chat/chat-prefs.js index 325d6bd39a..8faa0fe217 100644 --- a/chat/chat-prefs.js +++ b/chat/chat-prefs.js @@ -36,6 +36,10 @@ pref("messenger.conversations.autoAcceptChatInvitations", 1); // by the UI or if they can be put on hold instead. pref("messenger.conversations.alwaysClose", false); +// Put conversations with contacts on hold by default (i.e. match the default +// behavior for MUCs) as long as .alwaysClose is not true. +pref("messenger.conversations.holdByDefault", false); + pref("messenger.conversations.selections.magicCopyEnabled", true); pref("messenger.conversations.selections.ellipsis", "chrome://chat/locale/conversations.properties"); pref("messenger.conversations.selections.systemMessagesTemplate", "chrome://chat/locale/conversations.properties"); diff --git a/chat/components/src/imConversations.js b/chat/components/src/imConversations.js index d823279b2d..36c486f080 100644 --- a/chat/components/src/imConversations.js +++ b/chat/components/src/imConversations.js @@ -206,7 +206,8 @@ UIConversation.prototype = { if (!Services.prefs.getBoolPref("messenger.conversations.alwaysClose") && (this.isChat && !this.left || - !this.isChat && this.unreadIncomingMessageCount != 0)) + !this.isChat && (this.unreadIncomingMessageCount != 0 || + Services.prefs.getBoolPref("messenger.conversations.holdByDefault")))) return false; this.close();