message.setFrom(room.getRole().getRoleAddress());
}
// Add the delay information to the message
Element delayInformation = message.addChildElement("delay", "urn:xmpp:delay");
Element delayInformationOld = message.addChildElement("x", "jabber:x:delay");
delayInformation.addAttribute("stamp", UTC_FORMAT.format(sentDate));
delayInformationOld.addAttribute("stamp", UTC_FORMAT_OLD.format(sentDate));
if (room.canAnyoneDiscoverJID()) {
// Set the Full JID as the "from" attribute
delayInformation.addAttribute("from", senderJID);