diff options
Diffstat (limited to 'server/plugin.py')
| -rw-r--r-- | server/plugin.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/server/plugin.py b/server/plugin.py index 393e675..8d2e8c2 100644 --- a/server/plugin.py +++ b/server/plugin.py @@ -9,7 +9,7 @@ from sleekxmpp.xmlstream.handler.callback import Callback from sleekxmpp.xmlstream.matcher.xpath import MatchXPath from sleekxmpp.stanza.iq import Iq -from object import Object, ObjectError +from object import ObjectReader, ObjectError from permission import PermissionError class AliasQuery(ElementBase): @@ -58,7 +58,7 @@ class AliasPlugin(base.base_plugin): caller = iq['from'].bare if iq['alias']['type'] == 'keys': - key, salt = Object(caller).get_private_key(); + key, salt = ObjectReader(caller).get_private_key(); iq.reply() iq['alias']['type'] = 'keys' iq['alias']['key'] = key @@ -71,10 +71,7 @@ class AliasPlugin(base.base_plugin): logging.error("callee field not base64 encoded") node = iq['alias']['node'] - if not node: - node = hashlib.sha1(callee).hexdigest() - - node = Object(callee, node) + node = ObjectReader(callee, node) if iq['alias']['type'] == 'items': try: |
