From 279e80ef46d95ae7dec00e375b5001abfe7b5d7a Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 27 Jun 2013 12:10:11 +0100 Subject: [PATCH] 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 --- src/protocol.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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" /* ? */ }, -- 1.8.3.1