From 148167edff6e19177883f81281f48b660ad20836 Mon Sep 17 00:00:00 2001 From: Ben Date: Thu, 11 Feb 2010 18:23:49 +0000 Subject: [PATCH] Ensure migrated mappings have public IM usernames in canonical form. --- perl/lib/Thrasher/Backend/Migrate.pm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/perl/lib/Thrasher/Backend/Migrate.pm b/perl/lib/Thrasher/Backend/Migrate.pm index a1515c2..fdb379a 100644 --- a/perl/lib/Thrasher/Backend/Migrate.pm +++ b/perl/lib/Thrasher/Backend/Migrate.pm @@ -76,6 +76,13 @@ sub migrate { print "Got mappings to migrate: " . Dumper($mappings); } else { while (my ($legacy, $mapped_jid) = each %$mappings) { + # The source transport may have a different + # canonical form for public IM usernames. This may + # cause Thrasher to think $legacy was not already + # mapped and create a duplicate mapping (e.g. + # optional spaces for AIM). + $legacy = $protocol->process_remote_username($legacy); + $dest->store_username_mapping($jid, $legacy, $mapped_jid); } } -- 2.11.4.GIT