diff --git a/documentation/extensions/muc.html b/documentation/extensions/muc.html index 9f9db7bfb..ead69564a 100644 --- a/documentation/extensions/muc.html +++ b/documentation/extensions/muc.html @@ -112,12 +112,10 @@ join message to send. If you want to just join the room without a password and w of history to receive then you could use join(String nickname) where nickname if your nickname in the room. In case the room requires a password in order to join you could then use join(String nickname, String password). And finally, the most complete way to join a room is to send -join(String nickname, long timeout, String password, int maxchars, int maxstanzas, int seconds, Date since) -where nickname is your nickname in the room, timeout is the amount of time to wait for a reply from the MUC -service(in milleseconds), password is your password to join the room, maxchars is the total number of characters -to receive in the history, maxstanzas is the total number of messages to receive in the history, seconds indicates -to the service to send only the messages received in the last "X" seconds and since indicates to the service -to send only the messages received since the Date specified.

+join(String nickname, String password, DiscussionHistory history, long timeout) +where nickname is your nickname in the room, , password is your password to join the room, history is +an object that specifies the amount of history to receive and timeout is the milliseconds to wait +for a response from the server.

Examples

@@ -150,8 +148,10 @@ to receive:
MultiUserChat muc2 = new MultiUserChat(conn1, "myroom@conference.jabber.org"); // User2 joins the new room using a password and specifying - // the amount of history to receive - muc2.join("testbot2",SmackConfiguration.getPacketReplyTimeout(), "password", 0, -1, -1, null); + // the amount of history to receive. In this example we are requesting the last 5 messages. + DiscussionHistory history = new DiscussionHistory(); + history.setMaxStanzas(5); + muc2.join("testbot2", "password", history, SmackConfiguration.getPacketReplyTimeout());