Mercurial > libervia-backend
comparison sat/plugins/plugin_xep_0060.py @ 3933:cecf45416403
plugin XEP-0373 and XEP-0374: Implementation of OX and OXIM:
GPGME is used as the GPG provider.
rel 374
author | Syndace <me@syndace.dev> |
---|---|
date | Tue, 20 Sep 2022 16:22:18 +0200 |
parents | 8289ac1b34f4 |
children | e345d93fb6e5 |
comparison
equal
deleted
inserted
replaced
3932:7af29260ecb8 | 3933:cecf45416403 |
---|---|
891 client = self.host.getClient(profile_key) | 891 client = self.host.getClient(profile_key) |
892 return self.createNode( | 892 return self.createNode( |
893 client, jid.JID(service_s) if service_s else None, nodeIdentifier, options | 893 client, jid.JID(service_s) if service_s else None, nodeIdentifier, options |
894 ) | 894 ) |
895 | 895 |
896 def createNode(self, client, service, nodeIdentifier=None, options=None): | 896 def createNode( |
897 self, | |
898 client: SatXMPPClient, | |
899 service: jid.JID, | |
900 nodeIdentifier: Optional[str] = None, | |
901 options: Optional[Dict[str, str]] = None | |
902 ) -> str: | |
897 """Create a new node | 903 """Create a new node |
898 | 904 |
899 @param service(jid.JID): PubSub service, | 905 @param service: PubSub service, |
900 @param NodeIdentifier(unicode, None): node name | 906 @param NodeIdentifier: node name use None to create instant node (identifier will |
901 use None to create instant node (identifier will be returned by this method) | 907 be returned by this method) |
902 @param option(dict[unicode, unicode], None): node configuration options | 908 @param option: node configuration options |
903 @return (unicode): identifier of the created node (may be different from requested name) | 909 @return: identifier of the created node (may be different from requested name) |
904 """ | 910 """ |
905 # TODO: if pubsub service doesn't hande publish-options, configure it in a second time | 911 # TODO: if pubsub service doesn't hande publish-options, configure it in a second time |
906 return client.pubsub_client.createNode(service, nodeIdentifier, options) | 912 return client.pubsub_client.createNode(service, nodeIdentifier, options) |
907 | 913 |
908 @defer.inlineCallbacks | 914 @defer.inlineCallbacks |