def join(self, roomJID, nick, historyOptions=None, password=None):
    '\n        Join a MUC room by sending presence to it.\n\n        @param roomJID: The JID of the room the entity is joining.\n        @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}\n\n        @param nick: The nick name for the entitity joining the room.\n        @type nick: C{unicode}\n\n        @param historyOptions: Options for conversation history sent by the\n            room upon joining.\n        @type historyOptions: L{HistoryOptions}\n\n        @param password: Optional password for the room.\n        @type password: C{unicode}\n\n        @return: A deferred that fires when the entity is in the room or an\n                 error has occurred.\n        '
    occupantJID = jid.JID(tuple=(roomJID.user, roomJID.host, nick))
    presence = BasicPresence(recipient=occupantJID)
    if password:
        presence.password = password
    if historyOptions:
        presence.history = historyOptions
    return self._sendDeferred(presence)
Join a MUC room by sending presence to it.

@param roomJID: The JID of the room the entity is joining.
@type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}

@param nick: The nick name for the entitity joining the room.
@type nick: C{unicode}

@param historyOptions: Options for conversation history sent by the
    room upon joining.
@type historyOptions: L{HistoryOptions}

@param password: Optional password for the room.
@type password: C{unicode}

@return: A deferred that fires when the entity is in the room or an
         error has occurred.
def join(self, roomJID, nick, historyOptions=None, password=None):
    '\n        Join a MUC room by sending presence to it.\n\n        @param roomJID: The JID of the room the entity is joining.\n        @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}\n\n        @param nick: The nick name for the entitity joining the room.\n        @type nick: C{unicode}\n\n        @param historyOptions: Options for conversation history sent by the\n            room upon joining.\n        @type historyOptions: L{HistoryOptions}\n\n        @param password: Optional password for the room.\n        @type password: C{unicode}\n\n        @return: A deferred that fires when the entity is in the room or an\n                 error has occurred.\n        '
    occupantJID = jid.JID(tuple=(roomJID.user, roomJID.host, nick))
    presence = BasicPresence(recipient=occupantJID)
    if password:
        presence.password = password
    if historyOptions:
        presence.history = historyOptions
    return self._sendDeferred(presence)