summaryrefslogtreecommitdiff
path: root/sleekxmpp/xmlstream/stanzabase.py
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2012-06-19 16:20:54 -0700
committerLance Stout <lancestout@gmail.com>2012-06-19 16:20:54 -0700
commit433ee08687e5a0df7e0d1388f194d246f5aaee05 (patch)
treeb3686c3f2c237f1f1def40718a5570d546cb9543 /sleekxmpp/xmlstream/stanzabase.py
parent7858d969d82eaaa7124b8d59a68c286f06cbf758 (diff)
downloadslixmpp-433ee08687e5a0df7e0d1388f194d246f5aaee05.tar.gz
slixmpp-433ee08687e5a0df7e0d1388f194d246f5aaee05.tar.bz2
slixmpp-433ee08687e5a0df7e0d1388f194d246f5aaee05.tar.xz
slixmpp-433ee08687e5a0df7e0d1388f194d246f5aaee05.zip
Allow message and presence stanzas to be embedded as substanzas.
Diffstat (limited to 'sleekxmpp/xmlstream/stanzabase.py')
-rw-r--r--sleekxmpp/xmlstream/stanzabase.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/sleekxmpp/xmlstream/stanzabase.py b/sleekxmpp/xmlstream/stanzabase.py
index a653034e..64e00626 100644
--- a/sleekxmpp/xmlstream/stanzabase.py
+++ b/sleekxmpp/xmlstream/stanzabase.py
@@ -277,7 +277,7 @@ class ElementBase(object):
:param xml: Initialize the stanza object with an existing XML object.
- :param parent: Optionally specify a parent stanza object will will
+ :param parent: Optionally specify a parent stanza object will
contain this substanza.
"""
@@ -1424,6 +1424,8 @@ class StanzaBase(ElementBase):
:param sfrom: Optional string or :class:`sleekxmpp.xmlstream.JID`
object of the sender's JID.
:param string sid: Optional ID value for the stanza.
+ :param parent: Optionally specify a parent stanza object will
+ contain this substanza.
"""
#: The default XMPP client namespace
@@ -1438,11 +1440,11 @@ class StanzaBase(ElementBase):
types = set(('get', 'set', 'error', None, 'unavailable', 'normal', 'chat'))
def __init__(self, stream=None, xml=None, stype=None,
- sto=None, sfrom=None, sid=None):
+ sto=None, sfrom=None, sid=None, parent=None):
self.stream = stream
if stream is not None:
self.namespace = stream.default_ns
- ElementBase.__init__(self, xml)
+ ElementBase.__init__(self, xml, parent)
if stype is not None:
self['type'] = stype
if sto is not None: