-redis->psubscribe( "SEND $jid *", sub {
- my ( $body, $from ) = @_;
- my ( undef, undef, $to, $type ) = split(/\s/, $from);
- warn "SEND $jid -> $to $type | $body\n";
- $cl->send_message( $body, $to => $jid, $type );
+MQR::Redis->redis->psubscribe( "SEND $jid *", sub {
+ my ( $body, $channel ) = @_;
+ warn "<<<< ",dump( $channel, $body );
+ Encode::_utf8_on($body);
+
+ my ( undef, $gw, $type, $user, $to ) = split(/\s/, $channel);
+ warn "# send ", dump( $jid, $type, $to, $user, $body );
+ $cl->send_message( "<$user> $body", $to => $jid, $type );