Mercurial > libervia-backend
comparison src/plugins/plugin_comp_file_sharing.py @ 2529:cbbf2ff2ef3f
component file sharing: changed pubsub identity:
pubsub service disco identity has been changed to non standard "virtual" type, to avoid it to be used as main pubsub service by the client.
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 18 Mar 2018 11:26:01 +0100 |
parents | 65e278997715 |
children |
comparison
equal
deleted
inserted
replaced
2528:65e278997715 | 2529:cbbf2ff2ef3f |
---|---|
244 | 244 |
245 def __init__(self, plugin_parent): | 245 def __init__(self, plugin_parent): |
246 super(Comments_handler, self).__init__() # PubsubVirtualResource()) | 246 super(Comments_handler, self).__init__() # PubsubVirtualResource()) |
247 self.host = plugin_parent.host | 247 self.host = plugin_parent.host |
248 self.plugin_parent = plugin_parent | 248 self.plugin_parent = plugin_parent |
249 self.discoIdentity = {'category': 'pubsub', | |
250 'type': 'virtual', # FIXME: non standard, here to avoid this service being considered as main pubsub one | |
251 'name': 'files commenting service'} | |
249 | 252 |
250 def _getFileId(self, nodeIdentifier): | 253 def _getFileId(self, nodeIdentifier): |
251 if not nodeIdentifier.startswith(COMMENT_NODE_PREFIX): | 254 if not nodeIdentifier.startswith(COMMENT_NODE_PREFIX): |
252 raise error.StanzaError('item-not-found') | 255 raise error.StanzaError('item-not-found') |
253 file_id = nodeIdentifier[len(COMMENT_NODE_PREFIX):] | 256 file_id = nodeIdentifier[len(COMMENT_NODE_PREFIX):] |