# HG changeset patch # User Goffi # Date 1451842601 -3600 # Node ID 1fc6a380f4db029a0d662051842309877c55bc49 # Parent 7debf3a4bf14d82d3912adc3b2f7862f4b753ce1 plugin xep-0059: minor cleaning diff -r 7debf3a4bf14 -r 1fc6a380f4db src/plugins/plugin_xep_0059.py --- a/src/plugins/plugin_xep_0059.py Sun Jan 03 18:36:41 2016 +0100 +++ b/src/plugins/plugin_xep_0059.py Sun Jan 03 18:36:41 2016 +0100 @@ -22,16 +22,14 @@ from sat.core.log import getLogger log = getLogger(__name__) -from wokkel import disco, iwokkel -try: - from twisted.words.protocols.xmlstream import XMPPHandler -except ImportError: - from wokkel.subprotocols import XMPPHandler +from wokkel import disco +from wokkel import iwokkel +from wokkel import rsm + +from twisted.words.protocols.jabber import xmlstream from zope.interface import implements -NS_RSM = 'http://jabber.org/protocol/rsm' - PLUGIN_INFO = { "name": "Result Set Management", "import_name": "XEP-0059", @@ -53,11 +51,11 @@ return XEP_0059_handler() -class XEP_0059_handler(XMPPHandler): +class XEP_0059_handler(xmlstream.XMPPHandler): implements(iwokkel.IDisco) def getDiscoInfo(self, requestor, target, nodeIdentifier=''): - return [disco.DiscoFeature(NS_RSM)] + return [disco.DiscoFeature(rsm.NS_RSM)] def getDiscoItems(self, requestor, target, nodeIdentifier=''): return []