Further examination of restricting Ad-Hoc Publish
This commit is contained in:
parent
3597777bcc
commit
d6cd09d746
1 changed files with 14 additions and 1 deletions
|
@ -819,9 +819,22 @@ class Slixfeed(slixmpp.ClientXMPP):
|
||||||
jid_bare = session['from'].bare
|
jid_bare = session['from'].bare
|
||||||
chat_type = await get_chat_type(self, jid_bare)
|
chat_type = await get_chat_type(self, jid_bare)
|
||||||
moderator = None
|
moderator = None
|
||||||
|
operator = None
|
||||||
|
print('JID {} CHAT {}'.format(jid_full, chat_type))
|
||||||
|
print('JID {} CHAT {}'.format(jid_full, chat_type))
|
||||||
|
print('JID {} CHAT {}'.format(jid_full, chat_type))
|
||||||
|
print('JID {} CHAT {}'.format(jid_full, chat_type))
|
||||||
|
print('JID {} CHAT {}'.format(jid_full, chat_type))
|
||||||
if chat_type == 'groupchat':
|
if chat_type == 'groupchat':
|
||||||
moderator = is_moderator(self, jid_bare, jid_full)
|
moderator = is_moderator(self, jid_bare, jid_full)
|
||||||
if is_operator(self, jid_bare) or moderator:
|
else:
|
||||||
|
operator = is_operator(self, jid_bare)
|
||||||
|
print('OPERATOR {} MODERATOR {}'.format(operator, moderator))
|
||||||
|
print('OPERATOR {} MODERATOR {}'.format(operator, moderator))
|
||||||
|
print('OPERATOR {} MODERATOR {}'.format(operator, moderator))
|
||||||
|
print('OPERATOR {} MODERATOR {}'.format(operator, moderator))
|
||||||
|
print('OPERATOR {} MODERATOR {}'.format(operator, moderator))
|
||||||
|
if operator or moderator:
|
||||||
form = self['xep_0004'].make_form('form', 'PubSub')
|
form = self['xep_0004'].make_form('form', 'PubSub')
|
||||||
form['instructions'] = 'Publish news items to PubSub nodes.'
|
form['instructions'] = 'Publish news items to PubSub nodes.'
|
||||||
options = form.add_field(desc='From which medium source do you '
|
options = form.add_field(desc='From which medium source do you '
|
||||||
|
|
Loading…
Reference in a new issue