diff src/tools/common/uri.py @ 2326:91a14dab924d

tools (common/uri): buildXMPPUri: use XEP-0277 namespace as node if node is empty or None for microblog subtype
author Goffi <goffi@goffi.org>
date Thu, 13 Jul 2017 21:12:46 +0200
parents e5e54ff0b775
children f9adda22a2e1
line wrap: on
line diff
--- a/src/tools/common/uri.py	Thu Jul 13 20:55:35 2017 +0200
+++ b/src/tools/common/uri.py	Thu Jul 13 21:12:46 2017 +0200
@@ -84,7 +84,7 @@
     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'?')