* @param packet
* the message
*/
private void initiatePMSession(final ChatRoomPanel window,
final Message packet) {
final MUCBuddyStatus buddy = window.getBuddyStatus(packet.getFrom());
SwingUtilities.invokeLater(new Runnable() {
public void run() {
if (buddy.getConversation() == null) {
ChatPanel conver = new ChatPanel(buddy);
conver.setVisible(true);
buddy.setConversation(conver);
}
String messageBody = packet.getBody();
if (messageBody == null)
return;
Date date = new Date();
DelayInformation inf = (DelayInformation) packet.getExtension(
"x", "jabber:x:delay");
if (inf != null && inf.getStamp() != null)
date = inf.getStamp();
buddy.getConversation().receiveMessage("", "", messageBody, null,
date, false, false);
}
});
}