Posted on 2006-10-06 01:47:41-07 by brianharrington
Proper method for sending messages to groupchats
After successfully connecting, when executing the following code block:
my $message = Net::Jabber::Message->new(); $connection->MUCJoin("room" => "cafe", "server" => "conference.alticon.net", "nick" => "nagios"); $message->SetMessage( "to" => 'cafe@conference.alticon.net', "type" => "groupchat", "body" => $body); $connection->Send($message);
First and foremost, the user properly joins the chat. The problem is, the message is never recieved by the chatroom. The only difference between the SetMessage used here and the one i use to send messages directly to users is: 1) I have explicitly set the type to "groupchat"; 2) removed "from" information; 3) set the "to" to the name of the chatroom as it shows up in the room list. Any ideas?
Direct Responses: Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.