After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 662604 - In a conversation window, Contact → Add Contact… selects the wrong account
In a conversation window, Contact → Add Contact… selects the wrong account
Status: RESOLVED FIXED
Product: empathy
Classification: Core
Component: Chat
3.2.x
Other Linux
: Normal normal
: ---
Assigned To: empathy-maint
empathy-maint
Depends on: 662609
Blocks:
 
 
Reported: 2011-10-24 13:19 UTC by Will Thompson
Modified: 2011-10-28 13:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
account-chooser: factor out select_account() (1.78 KB, patch)
2011-10-26 10:31 UTC, Guillaume Desmottes
none Details | Review
empathy_account_chooser_set_account: select account later if not ready yet (4.97 KB, patch)
2011-10-26 10:31 UTC, Guillaume Desmottes
none Details | Review

Description Will Thompson 2011-10-24 13:19:46 UTC
Steps to reproduce:

• Have three XMPP accounts, named “Collabora”, “Facebook”, and “will@mydomain.co.uk” (obviously your mileage may vary, but for clarity I'm using the names I have);
• Pick Chat → New Conversation…
• Choose “Collabora” or “will@mydomain.co.uk” from the account dropdown, enter a JID, and hit Chat;
• In the resulting conversation window, verify that the tab tooltip and Contact → Information dialog both show the correct account;
• Pick Contact → Add Contact…

Expected results:

The account I was using to chat with the contact is pre-selected in the dialog.

Actual result:

The Facebook account (which is the second account, alphabetically speaking) is selected. Adding random contacts doesn't work on Facebook, so this essentially renders the dialog non-functional.

I've done a bit of tinkering, enabling and disabling accounts. For any given set of enabled XMPP accounts, the same (apparently arbitrary) one is selected whenever I open the dialog, but I can't see any obvious pattern. It's not always the second, for instance. If enabled, my Facebook account seems to be selected in preference to all others. It's probably just the first account in some hash table or something.
Comment 1 Guillaume Desmottes 2011-10-26 10:31:25 UTC
Created attachment 200015 [details] [review]
account-chooser: factor out select_account()
Comment 2 Guillaume Desmottes 2011-10-26 10:31:28 UTC
Created attachment 200016 [details] [review]
empathy_account_chooser_set_account: select account later if not ready yet

It's stupid to have to ask to any user of this widget to do this itself.
Comment 3 Guillaume Desmottes 2011-10-26 10:31:49 UTC
This is based on my branch fixing bug #662609
Comment 4 Chandni Verma 2011-10-28 13:41:29 UTC
Review of attachment 200015 [details] [review]:

++
Comment 5 Chandni Verma 2011-10-28 13:42:01 UTC
Review of attachment 200016 [details] [review]:

++
Comment 6 Guillaume Desmottes 2011-10-28 13:54:47 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.