Skip to content

Commit

Permalink
Bug 955536 - Add a pref to put conversations with contacts on hold by…
Browse files Browse the repository at this point in the history
… default. r=aleth
  • Loading branch information
arlolra committed Oct 31, 2014
1 parent be2a12d commit e395189
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions chat/chat-prefs.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
3 changes: 2 additions & 1 deletion chat/components/src/imConversations.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit e395189

Please sign in to comment.