*
* @param historyOptions
* @return
*/
private Presence createEnterPresence(final HistoryOptions historyOptions) {
final Presence presence = new Presence(null, roomUri);
final XMLPacket x = presence.getXML().addChild("x", XmppNamespaces.MUC);
presence.setPriority(0);
if (historyOptions != null) {
final XMLPacket h = x.addChild("history");
if (historyOptions.getMaxChars() >= 0) {
h.setAttribute("maxchars", Integer.toString(historyOptions.getMaxChars()));
}