tools (common/uri): buildXMPPUri: use XEP-0277 namespace as node if node is empty or None for microblog subtype

This commit is contained in:
Goffi 2017-07-13 21:12:46 +02:00
commit da75f58453

View file

@ -84,7 +84,7 @@ def buildXMPPUri(type_, **kwargs):
uri.append(urllib.quote_plus(path).replace(u'%40', '@'))
if type_ == u'pubsub':
if subtype == 'microblog' and not 'node' in kwargs:
if subtype == 'microblog' and not kwargs.get('node'):
kwargs[u'node'] = 'urn:xmpp:microblog:0'
if kwargs:
uri.append(u'?')