changeset 1413:e5393b12dd0f

tmp (mam): fixed name shadowing + getDiscoInfo for mam fix: getDiscoInfo now only returns MAM namespace when there is no node specified, this avoid having mam everywhere (which was causing issues in SàT PubSub's namespace delegation)
author Goffi <goffi@goffi.org>
date Fri, 17 Apr 2015 10:39:41 +0200
parents 979210da778a
children 159d16336f87
files src/tmp/wokkel/mam.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/tmp/wokkel/mam.py	Fri Apr 17 19:06:39 2015 +0200
+++ b/src/tmp/wokkel/mam.py	Fri Apr 17 10:39:41 2015 +0200
@@ -200,8 +200,8 @@
         for attr in ('always', 'never'):
             attr_elt = mam_elt.addElement(attr)
             jids = getattr(self, attr)
-            for jid in jids:
-                attr_elt.addElement('jid', content=jid.full())
+            for jid_ in jids:
+                attr_elt.addElement('jid', content=jid_.full())
         return mam_elt
 
     def render(self, parent):
@@ -521,6 +521,8 @@
         iq.handled = True
 
     def getDiscoInfo(self, requestor, target, nodeIdentifier=''):
+        if nodeIdentifier:
+            return []
         return [disco.DiscoFeature(NS_MAM)]
 
     def getDiscoItems(self, requestor, target, nodeIdentifier=''):