summaryrefslogtreecommitdiff
path: root/sleekxmpp/xmlstream/stanzabase.py
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2011-12-12 22:17:07 -0800
committerLance Stout <lancestout@gmail.com>2011-12-12 22:17:07 -0800
commiteff3330e754cfbb496d6ba761d0a821375f575c8 (patch)
tree0f141e4fa1a2fdfc5f3c7bb9621e1fff235dcecc /sleekxmpp/xmlstream/stanzabase.py
parentfc8a13df5a76176eb843ee0c4c4d4da462d3ab3b (diff)
downloadslixmpp-eff3330e754cfbb496d6ba761d0a821375f575c8.tar.gz
slixmpp-eff3330e754cfbb496d6ba761d0a821375f575c8.tar.bz2
slixmpp-eff3330e754cfbb496d6ba761d0a821375f575c8.tar.xz
slixmpp-eff3330e754cfbb496d6ba761d0a821375f575c8.zip
Add support for incoming/outgoing filters.
A filter accepts and returns a stanza, but potentially modified. To prevent sending/receiving a stanza, a filter may return None. Incoming: self.add_filter('in', in_filter) Outgoing: self.add_filter('out', out_filter) Filters are applied in the order thay are added. However, you may add an order parameter, which is the place in the list to insert the filter: self.add_filter('in', in_filter, order=0)
Diffstat (limited to 'sleekxmpp/xmlstream/stanzabase.py')
-rw-r--r--sleekxmpp/xmlstream/stanzabase.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/sleekxmpp/xmlstream/stanzabase.py b/sleekxmpp/xmlstream/stanzabase.py
index 389fe20c..2f864300 100644
--- a/sleekxmpp/xmlstream/stanzabase.py
+++ b/sleekxmpp/xmlstream/stanzabase.py
@@ -1251,7 +1251,7 @@ class StanzaBase(ElementBase):
stanza sent immediately. Useful for stream
initialization. Defaults to ``False``.
"""
- self.stream.send_raw(self.__str__(), now=now)
+ self.stream.send(self, now=now)
def __copy__(self):
"""Return a copy of the stanza object that does not share the