tweaked stanzas for easy use

This commit is contained in:
Nathan Fritz
2009-12-10 07:33:59 +00:00
parent 007b04dd30
commit a031dd24a6
6 changed files with 80 additions and 30 deletions

View File

@@ -19,6 +19,12 @@ class Message(StanzaBase):
self['type'] = 'normal'
return self
def reply(self, body=None):
StanzaBase.reply(self)
if body is not None:
self['body'] = body
return self
if __name__ == '__main__':
m = Message()
m['to'] = 'me'