diff options
| author | Guillaume Horel <guillaume.horel@gmail.com> | 2010-11-23 00:10:03 -0500 |
|---|---|---|
| committer | Guillaume Horel <guillaume.horel@gmail.com> | 2010-11-23 00:10:03 -0500 |
| commit | a5b4d8b2d4cda356afddcdab4864d27e165237f7 (patch) | |
| tree | 0b1de82863ab3e199418b20739b4b67e668c426d | |
| parent | f9ca13084a102cd453b10102c708ef3004405080 (diff) | |
| download | alias-a5b4d8b2d4cda356afddcdab4864d27e165237f7.tar.gz | |
Advertise alias in service discovery
| -rw-r--r-- | plugin.py | 4 | ||||
| -rw-r--r-- | server.py | 1 |
2 files changed, 5 insertions, 0 deletions
@@ -38,6 +38,10 @@ class AliasPlugin(base.base_plugin): AliasQuery.namespace)) self.xmpp.register_handler(Callback('Alias queries', query_parser, self.handle_alias_query)) + + def post_init(self): + base.base_plugin.post_init(self) + self.xmpp.plugin['xep_0030'].add_feature("alias:query") def handle_alias_query(self, iq): callee = base64.b64decode(iq['to'].user) @@ -11,6 +11,7 @@ class ObjectComponent(ComponentXMPP): def __init__(self, jid, secret, server, port, root): ComponentXMPP.__init__(self, jid, secret, server, port) + self.register_plugin('xep_0030') self.register_plugin("AliasPlugin", module = "plugin") self.add_event_handler("session_start", self.start) self.add_event_handler("presence_probe", self.presence_probe) |
