diff options
author | Lance Stout <lancestout@gmail.com> | 2011-12-12 22:37:19 -0800 |
---|---|---|
committer | Lance Stout <lancestout@gmail.com> | 2011-12-12 22:37:19 -0800 |
commit | cb635dcd5ab94a1cbc104788b33abefea12d0040 (patch) | |
tree | fd6956223a09a6528b0e648ed4c86beb377ed113 /sleekxmpp/xmlstream | |
parent | eff3330e754cfbb496d6ba761d0a821375f575c8 (diff) | |
download | slixmpp-cb635dcd5ab94a1cbc104788b33abefea12d0040.tar.gz slixmpp-cb635dcd5ab94a1cbc104788b33abefea12d0040.tar.bz2 slixmpp-cb635dcd5ab94a1cbc104788b33abefea12d0040.tar.xz slixmpp-cb635dcd5ab94a1cbc104788b33abefea12d0040.zip |
Add parameter docs for add_filter.
Diffstat (limited to 'sleekxmpp/xmlstream')
-rw-r--r-- | sleekxmpp/xmlstream/xmlstream.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sleekxmpp/xmlstream/xmlstream.py b/sleekxmpp/xmlstream/xmlstream.py index b690103c..8f662e88 100644 --- a/sleekxmpp/xmlstream/xmlstream.py +++ b/sleekxmpp/xmlstream/xmlstream.py @@ -750,6 +750,16 @@ class XMLStream(object): These filters are applied before incoming stanzas are passed to any handlers, and before outgoing stanzas are put in the send queue. + + Each filter must accept a single stanza, and return + either a stanza or ``None``. If the filter returns + ``None``, then the stanza will be dropped from being + processed for events or from being sent. + + :param mode: One of ``'in'`` or ``'out'``. + :param handler: The filter function. + :param int order: The position to insert the filter in + the list of active filters. """ if order: self.__filters[mode].insert(order, handler) |