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)
This commit is contained in:
Goffi 2015-04-17 10:39:41 +02:00
commit c50e5adb72

View file

@ -200,8 +200,8 @@ class MAMPrefs():
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 @@ class MAMService(XMPPHandler, IQHandlerMixin):
iq.handled = True
def getDiscoInfo(self, requestor, target, nodeIdentifier=''):
if nodeIdentifier:
return []
return [disco.DiscoFeature(NS_MAM)]
def getDiscoItems(self, requestor, target, nodeIdentifier=''):