From e8a3e92ceb17d57ae95efd2a3fe7ed82c6ce2a2f Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Tue, 10 Jul 2012 01:37:44 -0700 Subject: Update plugins to use session_bind handler for disco, and use plugin_end --- sleekxmpp/plugins/xep_0060/pubsub.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'sleekxmpp/plugins/xep_0060') diff --git a/sleekxmpp/plugins/xep_0060/pubsub.py b/sleekxmpp/plugins/xep_0060/pubsub.py index 31e59be9..387c5a0f 100644 --- a/sleekxmpp/plugins/xep_0060/pubsub.py +++ b/sleekxmpp/plugins/xep_0060/pubsub.py @@ -53,6 +53,13 @@ class XEP_0060(BasePlugin): StanzaPath('message/pubsub_event/subscription'), self._handle_event_subscription)) + def plugin_end(self): + self.xmpp.remove_handler('Pubsub Event: Items') + self.xmpp.remove_handler('Pubsub Event: Purge') + self.xmpp.remove_handler('Pubsub Event: Delete') + self.xmpp.remove_handler('Pubsub Event: Configuration') + self.xmpp.remove_handler('Pubsub Event: Subscription') + def _handle_event_items(self, msg): """Raise events for publish and retraction notifications.""" node = msg['pubsub_event']['items']['node'] -- cgit v1.2.3