Bug 44631 - haze cannot deal with some of the latest changes that came with libpurple 2.10.1
Summary: haze cannot deal with some of the latest changes that came with libpurple 2.10.1
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: haze (show other bugs)
Version: git master
Hardware: All All
: medium normal
Assignee: Simon McVittie
QA Contact: Telepathy bugs list
URL:
Whiteboard: review?
Keywords: patch
: 47891 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-01-10 04:40 UTC by Raymond Wooninck
Modified: 2013-09-23 15:23 UTC (History)
6 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Adjust for Sametime accounts getting a "usersplit" in libpurple 2.10.1 (1.83 KB, patch)
2013-06-27 11:11 UTC, Simon McVittie
Details | Splinter Review

Description Raymond Wooninck 2012-01-10 04:40:31 UTC
With the latest version of libpurple (2.10.1) a change was made to the Sametime protocol:

 + Sametime:
    - Separate "username" and "server" when adding new Sametime
      accounts

Although at first this seems harmless and only affecting the pidgin client, it seems that telepathy-haze can not handle this separation. When a new account is created for Sametime, the server details are no longer displayed. Also an old account (that has all the details already) no longer works due to the same issue. Adding the missing parameter to the accounts.cfg file (mission-control) causes that this parameter is ignored and removed. 

Returning to libpurple 2.10.0 resolves the issue and the server can be identified again when the account is created.
Comment 1 Joel 2012-10-29 15:01:26 UTC
Still running into this on Fedora 18 with:

libpurple-2.10.6-4.fc18.x86_64
telepathy-haze-0.6.0-2.fc18.x86_64
empathy-3.6.1-2.fc18.x86_64
Comment 2 Simone Caronni 2013-04-08 07:48:14 UTC
Any chance to see this fixed?

Thanks,
--Simone

libpurple-2.10.7-2.fc18.x86_64
telepathy-haze-0.6.0-2.fc18.x86_64
empathy-3.6.4-2.fc18.x86_64
meanwhile-1.1.0-9.fc18.x86_64
Comment 3 Simon McVittie 2013-06-25 10:23:16 UTC
What were the old account parameters called? What was their syntax?

What are the new account parameters called? What is their syntax?

Is there any way we can test Sametime without buying a server for it?

Does this untested patch work?

diff --git a/src/protocol.c b/src/protocol.c
index 639e25e..cd8593a 100644
--- a/src/protocol.c
+++ b/src/protocol.c
@@ -88,6 +88,11 @@ static const HazeParameterMapping irc_mappings[] = {
     { NULL, NULL }
 };
 
+static const HazeParameterMapping sametime_mappings[] = {
+    { "usersplit1", "server" },
+    { NULL, NULL }
+};
+
 static const HazeParameterMapping jabber_mappings[] = {
     { "connect_server", "server" },
     /* usersplit1 => domain is deliberately not in this map, because
@@ -200,7 +205,7 @@ static const KnownProtocolInfo known_protocol_info[] = {
     { "local-xmpp", "prpl-bonjour", bonjour_mappings, "" /* ? */ },
     { "msn", "prpl-msn", NULL, "x-msn" },
     { "qq", "prpl-qq", NULL, "x-qq" /* ? */ },
-    { "sametime", "prpl-meanwhile", NULL, "x-sametime" /* ? */ },
+    { "sametime", "prpl-meanwhile", sametime_mappings, "x-sametime" /* ? */ },
     { "sipe", "prpl-sipe", sipe_mappings, "" /* ? */ },
     { "yahoo", "prpl-yahoo", yahoo_mappings, "x-yahoo" },
     { "yahoojp", "prpl-yahoojp", yahoo_mappings, "x-yahoo" /* ? */ },
Comment 4 Simone Caronni 2013-06-25 11:20:49 UTC
Hello,

I'm the (unfortuante) mantainer of the meanwhile library in Fedora; I can make some test builds and then try to push patches to the appropriate component if they do work. Is the attached patch for telepathy-haze?

The old parameters were "account", "server", "port" and "password" IIRC.

Now I have all of them except the "server" one, to make it work correctly I have to use the following syntax in the connection parameters dialog in the "account" field:

<username>:<server>

I've the following components installed here.

libpurple-2.10.7-2.fc19.x86_64
telepathy-haze-0.7.0-3.fc19.x86_64
empathy-3.8.3-1.fc19.x86_64
meanwhile-1.1.0-10.fc19.x86_64

Thanks,
--Simone
Comment 5 Simon McVittie 2013-06-25 11:48:55 UTC
(In reply to comment #4)
> Is the attached patch for telepathy-haze?

Yes.

> The old parameters were "account", "server", "port" and "password" IIRC.
> 
> Now I have all of them except the "server" one, to make it work correctly I
> have to use the following syntax in the connection parameters dialog in the
> "account" field:
> 
> <username>:<server>

OK, that's what I thought. This suggests that doing the usersplit thing (as in the untested patch) should hopefully work: you'll pass 'account' and 'server' to Haze, and it will re-combine them like "${account}:${server}" for libpurple.
Comment 6 Simone Caronni 2013-06-26 06:48:50 UTC
I've tested the patch, the "server" field is there but it's not working.
I've created screenshots for the following steps here:

http://slaanesh.fedorapeople.org/sametime/

1- When creating the account the only field is "account", no "server" field.
2- I edit the "connection settings" and fill in the fields.
3- It asks me for the password, and when filling it in it keeps on asking.
4- If I edit the account settings to re-check, all the settings have vanished; only the account is there and the rest is blank.

It would be great to have this fix, but I understand that almost nobody is using IBM's Sametime anymore except for a few big companies (what luck I have!...) and that the server is proprietary; so maybe a faster / dirtier fix would be to add a text at the account creation screen (screenshot 1) with instructions to use <account>:<server> as the account name.
Comment 7 Simon McVittie 2013-06-26 11:07:05 UTC
(In reply to comment #6)
> 1- When creating the account the only field is "account", no "server" field.
> 2- I edit the "connection settings" and fill in the fields.
> 3- It asks me for the password, and when filling it in it keeps on asking.
> 4- If I edit the account settings to re-check, all the settings have
> vanished; only the account is there and the rest is blank.

That sounds like several bugs. What telepathy-mission-control version is this? Did you log out and back in (or reboot) between installing the patched Haze and trying to use it?

Since there are no Telepathy contributors with access to a Sametime server (as far as I know), if you want this fixed, I'm afraid you'll need to do some debugging. Sources of information that could be useful include:

* Empathy's Debug window (empathy-debugger)
* <https://live.gnome.org/Empathy/Debugging>
* <http://telepathy.freedesktop.org/wiki/Debugging/>
* dbus-monitor

The debug logs for both Haze and Mission Control are probably relevant.

(In reply to comment #6)
> maybe a faster / dirtier
> fix would be to add a text at the account creation screen (screenshot 1)
> with instructions to use <account>:<server> as the account name.

That'd be an Empathy feature request: Telepathy doesn't have much control over its account creation UI. If you're giving Empathy a protocol-specific UI for sametime anyway, you could use logic like:

* have text-entry boxes for both account and server
* if the connection manager claims to support the server parameter, send them as account and server
* if the connection manager does not claim to support the server parameter, send ${account}:${server} as the value of the 'account' parameter"

and it'd work whether Haze splits them or not.
Comment 8 Simone Caronni 2013-06-26 20:26:55 UTC
Unfortunately (depending on the point of view....) I'm not the sysadmin of the SameTime servers and I'm not able to ask creation of accounts for these purposes. I would be very glad to give accounts to developers but I can not :(

(In reply to comment #7)
> What telepathy-mission-control version is this?

telepathy-mission-control-5.14.1-2.fc19.x86_64

> Did you log out and back in (or reboot) between installing the patched
> Haze and trying to use it?

No, I simply quit empathy. Could not quit while I was at the office. Actually logging off and logging in back again solved the issue; sorry for the noise.

I can now log in after editing the account by splitting the account and server options.

Thanks for the patch. Can you push it to telepathy-haze?

> (In reply to comment #6)
> > maybe a faster / dirtier
> > fix would be to add a text at the account creation screen (screenshot 1)
> > with instructions to use <account>:<server> as the account name.
> 
> That'd be an Empathy feature request: Telepathy doesn't have much control
> over its account creation UI. If you're giving Empathy a protocol-specific
> UI for sametime anyway, you could use logic like:
> 
> * have text-entry boxes for both account and server
> * if the connection manager claims to support the server parameter, send
> them as account and server
> * if the connection manager does not claim to support the server parameter,
> send ${account}:${server} as the value of the 'account' parameter"
> 
> and it'd work whether Haze splits them or not.

Thanks, should I file a bug on Empathy for this?
Comment 9 Simon McVittie 2013-06-27 11:11:13 UTC
Created attachment 81546 [details] [review]
Adjust for Sametime accounts getting a "usersplit" in  libpurple 2.10.1

Previously, Sametime accounts had separate 'account' and 'server'
parameters. Upgrading to libpurple 2.10.1 caused them to have
a single 'account' parameter with syntax like "username:server",
flagged as being split at ":" - to keep existing accounts working,
we want to separate them again, like we do for IRC.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=44631
Tested-by: Simone Caronni
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Comment 10 Simon McVittie 2013-06-27 11:21:28 UTC
(In reply to comment #8)
> Thanks for the patch. Can you push it to telepathy-haze?

I can if someone reviews it (or tbh I'll push it after a while anyway, if nobody actually wants to veto it).

> > (In reply to comment #6)
> > If you're giving Empathy a protocol-specific
> > UI for sametime anyway, you could [...]
> 
> Thanks, should I file a bug on Empathy for this?

If you or any of the other people cc'd on this bug intend to implement one yourself, please open an 'enhancement' Empathy bug for it. libempathy/empathy-account-widget-* would be the right place to start.

Given that Sametime isn't widely-used, or testable outside organizations that have bought a server, I think it's unlikely that the Empathy maintainers would implement this protocol-specific UI themselves, but they'd probably accept patches.
Comment 11 Simon McVittie 2013-09-17 17:46:55 UTC
Fixed in 0.7.1
Comment 12 Simon McVittie 2013-09-23 15:23:53 UTC
*** Bug 47891 has been marked as a duplicate of this bug. ***


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.