# HG changeset patch # User Goffi # Date 1543654551 -3600 # Node ID a1ae63fe666dd94669cdf60eb241aa921fbb0f5b # Parent 0fc9a14a0ca0eafcd0243d9bc28dc852819c4476 wokkel/mam: updated to urn:xmpp:mam:2 namespace diff -r 0fc9a14a0ca0 -r a1ae63fe666d sat_tmp/wokkel/mam.py --- a/sat_tmp/wokkel/mam.py Sun Jul 08 18:27:34 2018 +0200 +++ b/sat_tmp/wokkel/mam.py Sat Dec 01 09:55:51 2018 +0100 @@ -44,7 +44,7 @@ import rsm -NS_MAM = 'urn:xmpp:mam:1' +NS_MAM = 'urn:xmpp:mam:2' NS_FORWARD = 'urn:xmpp:forward:0' FIELDS_REQUEST = "/iq[@type='get']/query[@xmlns='%s']" % NS_MAM @@ -361,7 +361,7 @@ """ @param mam: The MAM request. - @type mam: L{MAMQueryReques} + @type mam: L{MAMRequest} @return: The RSM answer. @rtype: L{RSMResponse} @@ -420,7 +420,7 @@ PREFS_SET_REQUEST: '_onPrefsSetRequest' } - _legacyFilters = {'start': {'fieldType': 'text-single', + _mainFilters = {'start': {'fieldType': 'text-single', 'var': 'start', 'label': 'Starting time', 'desc': 'Starting time a the result period.', @@ -491,7 +491,7 @@ unsupported_fields = [] if mam_.form: for key, field in mam_.form.fields.iteritems(): - if key not in self._legacyFilters and key not in self.extra_fields: + if key not in self._mainFilters and key not in self.extra_fields: log.msg('Ignored unsupported MAM filter: %s' % field) unsupported_fields.append(key) for key in unsupported_fields: @@ -603,7 +603,7 @@ form = data_form.Form(formType, formNamespace=NS_MAM) if formType == 'form': - for kwargs in MAMService._legacyFilters.values(): + for kwargs in MAMService._mainFilters.values(): form.addField(data_form.Field(**kwargs)) elif formType == 'submit': if start: