only set full jid when don't have one or it looks like a full one - otherwise things...
Matt S Trout [Wed, 16 Feb 2011 18:41:59 +0000 (18:41 +0000)]
lib/App/Clifton/Tower/Jabber.pm

index ffc852c..5d3bb14 100644 (file)
@@ -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/\/.*//;