From: Matt S Trout Date: Wed, 16 Feb 2011 18:41:59 +0000 (+0000) Subject: only set full jid when don't have one or it looks like a full one - otherwise things... X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=440ab0575e5fbda726b96185dfb8f55f3b38cf56;p=scpubgit%2FClifton.git only set full jid when don't have one or it looks like a full one - otherwise things will die when we get a non-full one later - god this is a hack --- diff --git a/lib/App/Clifton/Tower/Jabber.pm b/lib/App/Clifton/Tower/Jabber.pm index ffc852c..5d3bb14 100644 --- a/lib/App/Clifton/Tower/Jabber.pm +++ b/lib/App/Clifton/Tower/Jabber.pm @@ -60,7 +60,11 @@ sub handle_message { "Received message for ${\$msg->to} instead of $me - ignoring" } unless $msg->to =~ /^\Q$me/; # may be foo@gmail.com or .../gsklgsh - $self->full_jid($msg->to); # need foo@gmail.com/skldshgsdg here + if (!$self->full_jid + or ($self->full_jid !~ m{/} and $msg->to =~ m{/}) + ) { + $self->full_jid($msg->to); # need foo@gmail.com/skldshgsdg here + } (my $from = $msg->from) =~ s/\/.*//;