Mercurial > libervia-backend
comparison src/plugins/plugin_misc_groupblog.py @ 660:69a8bfd266a5
core, plugins: fixed bad use of children instead of elements() for domish.Element instances.
author | Goffi <goffi@goffi.org> |
---|---|
date | Tue, 15 Oct 2013 19:28:34 +0200 |
parents | 0e16288d6816 |
children | 0c2c1dfb79e4 |
comparison
equal
deleted
inserted
replaced
659:b6c22d9f593a | 660:69a8bfd266a5 |
---|---|
210 ret.append(microblog_data) | 210 ret.append(microblog_data) |
211 return ret | 211 return ret |
212 | 212 |
213 def _parseAccessData(self, microblog_data, item): | 213 def _parseAccessData(self, microblog_data, item): |
214 P = self.host.plugins["XEP-0060"] | 214 P = self.host.plugins["XEP-0060"] |
215 form_elts = filter(lambda elt: elt.name == "x", item.children) | 215 form_elts = [child for child in item.elements() if child.name == "x"] |
216 for form_elt in form_elts: | 216 for form_elt in form_elts: |
217 form = data_form.Form.fromElement(form_elt) | 217 form = data_form.Form.fromElement(form_elt) |
218 | 218 |
219 if (form.formNamespace == NS_PUBSUB_ITEM_CONFIG): | 219 if (form.formNamespace == NS_PUBSUB_ITEM_CONFIG): |
220 access_model = form.get(P.OPT_ACCESS_MODEL, 'open') | 220 access_model = form.get(P.OPT_ACCESS_MODEL, 'open') |