This is done by including a status code of "170" in the initial presence that the room sends to the new occupant: Example 34. If the user is entering a room in which the discussions are logged to a public archive (often accessible via HTTP), the service SHOULD allow the user to enter the room but MUST also warn the user that the discussions are logged. In MUC this is done by sending updated presence information to the room, specifically by sending presence to a new occupant JID in the same room (changing only the resource identifier in the occupant JID). Occupant Changes Nickname The service then sends two presence stanzas to the full JID of each occupant (including the occupant who is changing his or her room nickname), one of type "unavailable" for the old nickname and one indicating availability for the new nickname. To allow for proper synchronization of these messages to the user's other clients by If the sender attempts to send a private message of type "groupchat" to a particular occupant, the service MUST refuse to deliver the message (since the recipient's client would expect in-room messages to be of type "groupchat") and return a A common feature of chat rooms is the ability for an occupant to change his or her nickname within the room. The service MUST send complete message stanzas only (i.e., it MUST not literally truncate the history at a certain number of characters, but MUST send the largest number of complete stanzas that results in a number of characters less than or equal to the 'maxchars' value specified).
See the Nickname Conflict section of this document for details. (Note: The 'urn:xmpp:delay' namespace defined in ; some implementations include both formats for backward compatibility.) The service MUST send all discussion history messages before delivering the room subject and any "live" messages sent after the user enters the room. The 'from' attribute MUST be set to the JID of the room itself.NOTICE: The protocol defined herein is a Draft Standard of the XMPP Standards Foundation. element's 'thread' attribute, and include the Thread ID in any new messages sent to the room.Implementations are encouraged and the protocol is appropriate for deployment in production systems, but some changes to the protocol are possible before it becomes a Final Standard.1. Use of Thread IDs is RECOMMENDED because it helps to provide continuity between the one-to-one chat and the multi-user chat. Continuing the Discussion I: User Creates Room protocol enables the room creator to specify the datetime of each message from the one-to-one chat history (via the 'stamp' attribute), as well as the JID of the original sender of each message (via the 'from' attribute); note well that the 'from' here is not the room itself, since the originator of the message is the delaying party. This privilege is controlled by the "muc#roomconfig_allowpm" room configuration option. The message type SHOULD be "chat" and MUST NOT be "groupchat", but MAY be left unspecified (i.e., a normal message). If the room is non-anonymous, the service MAY include an A user might want to manage the amount of discussion history provided on entering a room (perhaps because the user is on a low-bandwidth connection or is using a small-footprint client). Note well that this means the room subject (and changes to the room subject prior to the current subject) are not part of the discussion history. (The room MUST NOT send any discussion history before it finishes sending room presence as specified in the Presence Broadcast section of this document.) Whether such history is sent, and how many messages comprise the history, shall be determined by the chat service implementation or specific deployment depending on local service policy or room configuration. Delivery of Discussion History  information qualified by the 'urn:xmpp:delay' namespace to indicate that they are sent with delayed delivery and to specify the times at which they were originally sent. Service Sends New Occupant's Presence to New Occupant After sending initial presence as shown above, depending on local service policy or room configuration a room MAY send discussion history to the new occupant.