def history(self, roomJID, messages):
    "\n        Send history to create a MUC based on a one on one chat.\n\n        See: http://xmpp.org/extensions/xep-0045.html#continue\n\n        @param roomJID: The room jabber/xmpp entity id.\n        @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}\n\n        @param messages: The history to send to the room as an ordered list of\n                         message, represented by a dictionary with the keys\n                         C{'stanza'}, holding the original stanza a\n                         L{domish.Element}, and C{'timestamp'} with the\n                         timestamp.\n        @type messages: C{list} of L{domish.Element}\n        "
    for message in messages:
        stanza = message['stanza']
        stanza['type'] = 'groupchat'
        delay = Delay(stamp=message['timestamp'])
        sender = stanza.getAttribute('from')
        if (sender is not None):
            delay.sender = jid.JID(sender)
        stanza.addChild(delay.toElement())
        stanza['to'] = roomJID.userhost()
        if stanza.hasAttribute('from'):
            del stanza['from']
        self.xmlstream.send(stanza)
Send history to create a MUC based on a one on one chat.

See: http://xmpp.org/extensions/xep-0045.html#continue

@param roomJID: The room jabber/xmpp entity id.
@type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}

@param messages: The history to send to the room as an ordered list of
                 message, represented by a dictionary with the keys
                 C{'stanza'}, holding the original stanza a
                 L{domish.Element}, and C{'timestamp'} with the
                 timestamp.
@type messages: C{list} of L{domish.Element}
def history(self, roomJID, messages):
    "\n        Send history to create a MUC based on a one on one chat.\n\n        See: http://xmpp.org/extensions/xep-0045.html#continue\n\n        @param roomJID: The room jabber/xmpp entity id.\n        @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>}\n\n        @param messages: The history to send to the room as an ordered list of\n                         message, represented by a dictionary with the keys\n                         C{'stanza'}, holding the original stanza a\n                         L{domish.Element}, and C{'timestamp'} with the\n                         timestamp.\n        @type messages: C{list} of L{domish.Element}\n        "
    for message in messages:
        stanza = message['stanza']
        stanza['type'] = 'groupchat'
        delay = Delay(stamp=message['timestamp'])
        sender = stanza.getAttribute('from')
        if (sender is not None):
            delay.sender = jid.JID(sender)
        stanza.addChild(delay.toElement())
        stanza['to'] = roomJID.userhost()
        if stanza.hasAttribute('from'):
            del stanza['from']
        self.xmlstream.send(stanza)