rename some archiving functions
This commit is contained in:
parent
3f4f07d326
commit
47ff962e5b
|
@ -210,7 +210,7 @@ class ArchivingStanzaSession(StanzaSession):
|
||||||
|
|
||||||
self.send(request)
|
self.send(request)
|
||||||
|
|
||||||
def respond_archiving_bob(self, form):
|
def respond_archiving(self, form):
|
||||||
field = form.getField('logging')
|
field = form.getField('logging')
|
||||||
options = [x[1] for x in field.getOptions()]
|
options = [x[1] for x in field.getOptions()]
|
||||||
values = field.getValues()
|
values = field.getValues()
|
||||||
|
@ -246,7 +246,7 @@ class ArchivingStanzaSession(StanzaSession):
|
||||||
|
|
||||||
self.send(response)
|
self.send(response)
|
||||||
|
|
||||||
def accept_archiving_bob(self, form):
|
def we_accept_archiving(self, form):
|
||||||
if self.negotiated['logging'] == 'mustnot':
|
if self.negotiated['logging'] == 'mustnot':
|
||||||
self.loggable = False
|
self.loggable = False
|
||||||
log.debug('archiving session accepted: %s' % self.loggable)
|
log.debug('archiving session accepted: %s' % self.loggable)
|
||||||
|
@ -255,7 +255,7 @@ class ArchivingStanzaSession(StanzaSession):
|
||||||
if self.control:
|
if self.control:
|
||||||
self.control.print_archiving_session_details()
|
self.control.print_archiving_session_details()
|
||||||
|
|
||||||
def accept_archiving_alice(self, form):
|
def archiving_accepted(self, form):
|
||||||
negotiated = {}
|
negotiated = {}
|
||||||
ask_user = {}
|
ask_user = {}
|
||||||
not_acceptable = []
|
not_acceptable = []
|
||||||
|
|
|
@ -401,7 +401,7 @@ class ChatControlSession(stanza_session.EncryptedStanzaSession):
|
||||||
if form.getType() == 'form' and 'security' in form.asDict():
|
if form.getType() == 'form' and 'security' in form.asDict():
|
||||||
security_options = [x[1] for x in form.getField('security').getOptions()]
|
security_options = [x[1] for x in form.getField('security').getOptions()]
|
||||||
if security_options == ['none']:
|
if security_options == ['none']:
|
||||||
self.respond_archiving_bob(form)
|
self.respond_archiving(form)
|
||||||
else:
|
else:
|
||||||
# bob responds
|
# bob responds
|
||||||
|
|
||||||
|
@ -443,7 +443,7 @@ class ChatControlSession(stanza_session.EncryptedStanzaSession):
|
||||||
elif self.status == 'requested-archiving' and form.getType() == \
|
elif self.status == 'requested-archiving' and form.getType() == \
|
||||||
'submit':
|
'submit':
|
||||||
try:
|
try:
|
||||||
self.accept_archiving_alice(form)
|
self.archiving_accepted(form)
|
||||||
except exceptions.NegotiationError, details:
|
except exceptions.NegotiationError, details:
|
||||||
self.fail_bad_negotiation(details)
|
self.fail_bad_negotiation(details)
|
||||||
|
|
||||||
|
@ -485,7 +485,7 @@ class ChatControlSession(stanza_session.EncryptedStanzaSession):
|
||||||
elif self.status == 'responded-archiving' and form.getType() == \
|
elif self.status == 'responded-archiving' and form.getType() == \
|
||||||
'result':
|
'result':
|
||||||
try:
|
try:
|
||||||
self.accept_archiving_bob(form)
|
self.we_accept_archiving(form)
|
||||||
except exceptions.NegotiationError, details:
|
except exceptions.NegotiationError, details:
|
||||||
self.fail_bad_negotiation(details)
|
self.fail_bad_negotiation(details)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue