diff options
Diffstat (limited to 'sleekxmpp')
-rw-r--r-- | sleekxmpp/xmlstream/stanzabase.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sleekxmpp/xmlstream/stanzabase.py b/sleekxmpp/xmlstream/stanzabase.py index 51966a4e..d7c7c7b4 100644 --- a/sleekxmpp/xmlstream/stanzabase.py +++ b/sleekxmpp/xmlstream/stanzabase.py @@ -1014,9 +1014,13 @@ class StanzaBase(ElementBase): Add XML content to the stanza. Arguments: - value -- An XML object, or a stanza object. + value -- Either an XML or a stanza object, or a list + of XML or stanza objects. """ - self.xml.append(value) + if not isinstance(value, list): + value = [value] + for val in value: + self.append(val) return self def delPayload(self): |