summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins/xep_0297/forwarded.py
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2012-09-25 12:25:45 -0700
committerLance Stout <lancestout@gmail.com>2012-09-25 12:25:45 -0700
commite449dce65c0d267c4d3206b6f9ac2e89807192bc (patch)
tree1e436290a05883e9ff15e50580657a3baef0880d /sleekxmpp/plugins/xep_0297/forwarded.py
parent671f680bb39f366ad13bf937c7b611f667343314 (diff)
downloadslixmpp-e449dce65c0d267c4d3206b6f9ac2e89807192bc.tar.gz
slixmpp-e449dce65c0d267c4d3206b6f9ac2e89807192bc.tar.bz2
slixmpp-e449dce65c0d267c4d3206b6f9ac2e89807192bc.tar.xz
slixmpp-e449dce65c0d267c4d3206b6f9ac2e89807192bc.zip
Fix handling forwarded stanzas to do proper lookups and deletions.
Diffstat (limited to 'sleekxmpp/plugins/xep_0297/forwarded.py')
-rw-r--r--sleekxmpp/plugins/xep_0297/forwarded.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/sleekxmpp/plugins/xep_0297/forwarded.py b/sleekxmpp/plugins/xep_0297/forwarded.py
index 7876967c..95703a2d 100644
--- a/sleekxmpp/plugins/xep_0297/forwarded.py
+++ b/sleekxmpp/plugins/xep_0297/forwarded.py
@@ -26,9 +26,14 @@ class XEP_0297(BasePlugin):
def plugin_init(self):
register_stanza_plugin(Message, Forwarded)
- register_stanza_plugin(Forwarded, Message)
- register_stanza_plugin(Forwarded, Presence)
- register_stanza_plugin(Forwarded, Iq)
+
+ # While these are marked as iterable, that is just for
+ # making it easier to extract the forwarded stanza. There
+ # still can be only a single forwarded stanza.
+ register_stanza_plugin(Forwarded, Message, iterable=True)
+ register_stanza_plugin(Forwarded, Presence, iterable=True)
+ register_stanza_plugin(Forwarded, Iq, iterable=True)
+
register_stanza_plugin(Forwarded, self.xmpp['xep_0203'].stanza.Delay)
self.xmpp.register_handler(