comparison src/plugins/plugin_xep_0060.py @ 1778:442303b62a16

plugin XEP-0060: fixed extra mam filters parsing
author Goffi <goffi@goffi.org>
date Thu, 07 Jan 2016 16:19:43 +0100
parents 8b18e5f55a90
children 6079752ffeae
comparison
equal deleted inserted replaced
1777:8b18e5f55a90 1778:442303b62a16
159 except (jid.InvalidFormat): 159 except (jid.InvalidFormat):
160 log.warning(u"Bad value for jid filter") 160 log.warning(u"Bad value for jid filter")
161 except KeyError: 161 except KeyError:
162 pass 162 pass
163 163
164 for name, value in extra: 164 for name, value in extra.iteritems():
165 if name.startswith(MAM_FILTER): 165 if name.startswith(MAM_FILTER):
166 var = name[len[MAM_FILTER]:] 166 var = name[len(MAM_FILTER):]
167 extra_fields = mam_args.setdefault('extra_fields', []) 167 extra_fields = mam_args.setdefault('extra_fields', [])
168 extra_fields.append(data_form.Field(var=var, value=value)) 168 extra_fields.append(data_form.Field(var=var, value=value))
169 169
170 if mam_args: 170 if mam_args:
171 assert 'mam' not in extra 171 assert 'mam' not in extra