Move XEP-0033 to new system.
Still needs updating to the new format.
This commit is contained in:
parent
6f337b5425
commit
d43cd9fa54
@ -7,11 +7,11 @@
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
from . import base
|
from sleekxmpp import Message
|
||||||
from .. xmlstream.handler.callback import Callback
|
from sleekxmpp.xmlstream.handler.callback import Callback
|
||||||
from .. xmlstream.matcher.xpath import MatchXPath
|
from sleekxmpp.xmlstream.matcher.xpath import MatchXPath
|
||||||
from .. xmlstream.stanzabase import registerStanzaPlugin, ElementBase, ET, JID
|
from sleekxmpp.xmlstream import register_stanza_plugin, ElementBase, ET, JID
|
||||||
from .. stanza.message import Message
|
from sleekxmpp.plugins import BasePlugin, register_plugin
|
||||||
|
|
||||||
|
|
||||||
class Addresses(ElementBase):
|
class Addresses(ElementBase):
|
||||||
@ -145,17 +145,22 @@ class Address(ElementBase):
|
|||||||
del self.xml.attrib['uri']
|
del self.xml.attrib['uri']
|
||||||
|
|
||||||
|
|
||||||
class xep_0033(base.base_plugin):
|
class XEP_0033(BasePlugin):
|
||||||
|
|
||||||
"""
|
"""
|
||||||
XEP-0033: Extended Stanza Addressing
|
XEP-0033: Extended Stanza Addressing
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
name = 'xep_0033'
|
||||||
|
description = 'XEP-0033: Extended Stanza Addressing'
|
||||||
|
dependencies = set(['xep_0033'])
|
||||||
|
|
||||||
def plugin_init(self):
|
def plugin_init(self):
|
||||||
self.xep = '0033'
|
self.xep = '0033'
|
||||||
self.description = 'Extended Stanza Addressing'
|
|
||||||
|
|
||||||
registerStanzaPlugin(Message, Addresses)
|
register_stanza_plugin(Message, Addresses)
|
||||||
|
|
||||||
def post_init(self):
|
|
||||||
base.base_plugin.post_init(self)
|
|
||||||
self.xmpp.plugin['xep_0030'].add_feature(Addresses.namespace)
|
self.xmpp.plugin['xep_0030'].add_feature(Addresses.namespace)
|
||||||
|
|
||||||
|
|
||||||
|
register_plugin(XEP_0033)
|
||||||
|
Loading…
Reference in New Issue
Block a user