Advertize the disco#info feature in our disco#info

Actually a MUST in XEP-0030
This commit is contained in:
mathieui 2015-05-08 13:40:25 +02:00
parent 116a33ba51
commit f1e6d6b0a9
No known key found for this signature in database
GPG key ID: C59F84CEEFD616E3

View file

@ -122,6 +122,12 @@ class XEP_0030(BasePlugin):
for op in self._disco_ops:
self.api.register(getattr(self.static, op), op, default=True)
def session_bind(self, jid):
self.add_feature('http://jabber.org/protocol/disco#info')
def plugin_end(self):
self.del_feature('http://jabber.org/protocol/disco#info')
def _add_disco_op(self, op, default_handler):
self.api.register(default_handler, op)
self.api.register_default(default_handler, op)