"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/\/.*//;