Mercurial > libervia-backend
changeset 2201:40dd9eb2692c
plugin groupblog, XEP-0060: added ACCESS_PUBLISHER_ROSTER and switched to it in groupblog
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 23 Mar 2017 09:11:25 +0100 (2017-03-23) |
parents | 95dc90f1065a |
children | 7f91b894bfdf |
files | src/plugins/plugin_misc_groupblog.py src/plugins/plugin_xep_0060.py |
diffstat | 2 files changed, 4 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/plugins/plugin_misc_groupblog.py Thu Mar 23 09:07:10 2017 +0100 +++ b/src/plugins/plugin_misc_groupblog.py Thu Mar 23 09:11:25 2017 +0100 @@ -99,8 +99,7 @@ if config_form is None: return access_model = config_form.get(self._p.OPT_ACCESS_MODEL, self._p.ACCESS_OPEN) - # FIXME: ACCESS_ROSTER need to be changed to a new ACCESS_PUBLISHER_ROSTER when available - if access_model == self._p.ACCESS_ROSTER: + if access_model == self._p.ACCESS_PUBLISHER_ROSTER: data_format.iter2dict('group', config_form.fields[self._p.OPT_ROSTER_GROUPS_ALLOWED].values, microblog_data) def _data2entryTrigger(self, client, mb_data, entry_elt, item_elt): @@ -116,8 +115,7 @@ raise exceptions.CancelError(u"GroupBlog is not available") log.debug(u"This entry use group blog") form = data_form.Form('submit', formNamespace=NS_PUBSUB_ITEM_CONFIG) - # FIXME: ACCESS_ROSTER need to be changed to a new ACCESS_PUBLISHER_ROSTER when available - access = data_form.Field(None, self._p.OPT_ACCESS_MODEL, value=self._p.ACCESS_ROSTER) + access = data_form.Field(None, self._p.OPT_ACCESS_MODEL, value=self._p.ACCESS_PUBLISHER_ROSTER) allowed = data_form.Field(None, self._p.OPT_ROSTER_GROUPS_ALLOWED, values=groups) form.addField(access) form.addField(allowed) @@ -129,8 +127,7 @@ It changes the access mode to roster if needed, and give the authorized groups """ if "group" in mb_data: - # FIXME: ACCESS_ROSTER need to be changed to a new ACCESS_PUBLISHER_ROSTER when available - options[self._p.OPT_ACCESS_MODEL] = self._p.ACCESS_ROSTER + options[self._p.OPT_ACCESS_MODEL] = self._p.ACCESS_PUBLISHER_ROSTER options[self._p.OPT_ROSTER_GROUPS_ALLOWED] = list(data_format.dict2iter('group', mb_data))
--- a/src/plugins/plugin_xep_0060.py Thu Mar 23 09:07:10 2017 +0100 +++ b/src/plugins/plugin_xep_0060.py Thu Mar 23 09:11:25 2017 +0100 @@ -76,6 +76,7 @@ ACCESS_OPEN = 'open' ACCESS_PRESENCE = 'presence' ACCESS_ROSTER = 'roster' + ACCESS_PUBLISHER_ROSTER = 'publisher-roster' ACCESS_AUTHORIZE = 'authorize' ACCESS_WHITELIST = 'whitelist'