diff sat_pubsub/delegation.py @ 334:0a93d71f9503

delegation: use same disco for all pubsub namespaces
author Goffi <goffi@goffi.org>
date Sat, 03 Jun 2017 16:12:46 +0200
parents 54d90c73b8b5
children 3bbab2173ebc
line wrap: on
line diff
--- a/sat_pubsub/delegation.py	Sat Jun 03 15:31:07 2017 +0200
+++ b/sat_pubsub/delegation.py	Sat Jun 03 16:12:46 2017 +0200
@@ -232,6 +232,11 @@
             log.msg("No namespace found in node {}".format(nodeIdentifier))
             return []
 
+        if namespace.startswith(pubsub.NS_PUBSUB):
+            # pubsub use several namespaces starting with NS_PUBSUB (e.g. http://jabber.org/protocol/pubsub#owner)
+            # we return the same disco for all of them
+            namespace = pubsub.NS_PUBSUB
+
         def gotInfos(infos):
             ns_features = []
             for info in infos: