Simplify registering API handler defaults.
This commit is contained in:
parent
4921c44d0a
commit
e0dd9c3618
@ -119,8 +119,7 @@ class XEP_0030(BasePlugin):
|
|||||||
'get_cached_info', 'supports', 'has_identity']
|
'get_cached_info', 'supports', 'has_identity']
|
||||||
|
|
||||||
for op in self._disco_ops:
|
for op in self._disco_ops:
|
||||||
self.api.register(getattr(self.static, op), op)
|
self.api.register(getattr(self.static, op), op, default=True)
|
||||||
self.api.register_default(getattr(self.static, op), op)
|
|
||||||
|
|
||||||
def _add_disco_op(self, op, default_handler):
|
def _add_disco_op(self, op, default_handler):
|
||||||
self.api.register(default_handler, op)
|
self.api.register(default_handler, op)
|
||||||
|
@ -78,8 +78,7 @@ class XEP_0115(BasePlugin):
|
|||||||
self.static = StaticCaps(self.xmpp, disco.static)
|
self.static = StaticCaps(self.xmpp, disco.static)
|
||||||
|
|
||||||
for op in self._disco_ops:
|
for op in self._disco_ops:
|
||||||
self.api.register(getattr(self.static, op), op)
|
self.api.register(getattr(self.static, op), op, default=True)
|
||||||
self.api.register_default(getattr(self.static, op), op)
|
|
||||||
|
|
||||||
self._run_node_handler = disco._run_node_handler
|
self._run_node_handler = disco._run_node_handler
|
||||||
|
|
||||||
|
@ -61,8 +61,7 @@ class XEP_0128(BasePlugin):
|
|||||||
self.disco.del_extended_info = self.del_extended_info
|
self.disco.del_extended_info = self.del_extended_info
|
||||||
|
|
||||||
for op in self._disco_ops:
|
for op in self._disco_ops:
|
||||||
self.api.register(getattr(self.static, op), op)
|
self.api.register(getattr(self.static, op), op, default=True)
|
||||||
self.api.register_default(getattr(self.static, op), op)
|
|
||||||
|
|
||||||
def set_extended_info(self, jid=None, node=None, **kwargs):
|
def set_extended_info(self, jid=None, node=None, **kwargs):
|
||||||
"""
|
"""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user