Mercurial > libervia-backend
diff src/plugins/plugin_xep_0059.py @ 1769:1fc6a380f4db
plugin xep-0059: minor cleaning
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 03 Jan 2016 18:36:41 +0100 |
parents | d17772b0fe22 |
children | 2daf7b4c6756 |
line wrap: on
line diff
--- 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 []