Mercurial > libervia-backend
changeset 1769:1fc6a380f4db
plugin xep-0059: minor cleaning
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 03 Jan 2016 18:36:41 +0100 |
parents | 7debf3a4bf14 |
children | f525c272fd6d |
files | src/plugins/plugin_xep_0059.py |
diffstat | 1 files changed, 7 insertions(+), 9 deletions(-) [+] |
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 []