From 46aae8fa400f8577ea7d652b2a525d2e49b7d104 Mon Sep 17 00:00:00 2001 From: Sukhbir Singh Date: Mon, 22 Feb 2016 22:23:34 -0500 Subject: [PATCH] Bug 17833: Do not merge contacts (first commit) --- projects/instantbird/config | 1 + .../trac-17833-merge-contact.patch | 28 +++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 projects/instantbird/trac-17833-merge-contact.patch diff --git a/projects/instantbird/config b/projects/instantbird/config index 3412ab9..d5d3b1b 100644 --- a/projects/instantbird/config +++ b/projects/instantbird/config @@ -75,6 +75,7 @@ input_files: - filename: trac-16489.patch - filename: trac-17896.patch - filename: trac-17494.patch + - filename: trac-17833-merge-contact.patch - filename: version.patch - filename: search-context-menu.patch - filename: search-preferences-xul.patch diff --git a/projects/instantbird/trac-17833-merge-contact.patch b/projects/instantbird/trac-17833-merge-contact.patch new file mode 100644 index 0000000..87f173a --- /dev/null +++ b/projects/instantbird/trac-17833-merge-contact.patch @@ -0,0 +1,28 @@ +diff --git a/chat/components/src/imContacts.js b/chat/components/src/imContacts.js +--- a/chat/components/src/imContacts.js ++++ b/chat/components/src/imContacts.js +@@ -588,23 +588,7 @@ + this._buddies.every(function(b) b._empty), + + mergeContact: function(aContact) { +- // Avoid merging the contact with itself or merging into an +- // already removed contact. +- if (aContact.id == this.id || !(this.id in ContactsById)) +- throw Components.results.NS_ERROR_INVALID_ARG; +- +- this._ensureNotDummy(); +- let contact = ContactsById[aContact.id]; // remove XPConnect wrapper +- +- // Copy all the contact-only tags first, otherwise they would be lost. +- for each (let tag in contact.getTags()) +- if (!contact._isTagInherited(tag)) +- this.addTag(tag); +- +- // Adopt each buddy. Removing the last one will delete the contact. +- for each (let buddy in contact.getBuddies()) +- buddy.contact = this; +- this._updatePreferredBuddy(); ++ return; + }, + moveBuddyBefore: function(aBuddy, aBeforeBuddy) { + let buddy = BuddiesById[aBuddy.id]; // remove XPConnect wrapper