Skip to content

Instantly share code, notes, and snippets.

@tsal
Created September 13, 2014 17:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tsal/8ff13edace66abb95e14 to your computer and use it in GitHub Desktop.
Save tsal/8ff13edace66abb95e14 to your computer and use it in GitHub Desktop.
def join(self, room):
tjid = jid.JID(room)
presence = domish.Element(('jabber:client', 'presence'))
presence['to']=tjid.full()
x = presence.addElement(('http://jabber.org/protocol/muc', 'x'))
history = x.addElement((None, 'history'))
history['seconds'] = '0'
#print presence.toXml()
self.xmlstream.send(presence)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment