fix setting free for chat status through adhoc commands. fixes #1910
This commit is contained in:
parent
1a8b77f1cc
commit
ccc0cfd708
|
@ -97,7 +97,7 @@ class ChangeStatusCommand(AdHocCommand):
|
||||||
var = 'presence-type',
|
var = 'presence-type',
|
||||||
label = 'Type of presence:',
|
label = 'Type of presence:',
|
||||||
options = [
|
options = [
|
||||||
(u'free-for-chat', _('Free for chat')),
|
(u'chat', _('Free for chat')),
|
||||||
(u'online', _('Online')),
|
(u'online', _('Online')),
|
||||||
(u'away', _('Away')),
|
(u'away', _('Away')),
|
||||||
(u'xa', _('Extended away')),
|
(u'xa', _('Extended away')),
|
||||||
|
@ -128,7 +128,7 @@ class ChangeStatusCommand(AdHocCommand):
|
||||||
try:
|
try:
|
||||||
presencetype = form['presence-type'].value
|
presencetype = form['presence-type'].value
|
||||||
if not presencetype in \
|
if not presencetype in \
|
||||||
('free-for-chat', 'online', 'away', 'xa', 'dnd', 'offline'):
|
('chat', 'online', 'away', 'xa', 'dnd', 'offline'):
|
||||||
self.badRequest(request)
|
self.badRequest(request)
|
||||||
return False
|
return False
|
||||||
except Exception: # KeyError if there's no presence-type field in form or
|
except Exception: # KeyError if there's no presence-type field in form or
|
||||||
|
|
Loading…
Reference in New Issue