limit priority value inc ase user set an invalid priority in ACE. Fixes #8630

This commit is contained in:
Yann Leboulanger 2017-07-24 21:48:46 +02:00
parent 5e63461e6d
commit f36860e37d
1 changed files with 8 additions and 2 deletions

View File

@ -482,5 +482,11 @@ def get_priority(account, show):
if show in ('online', 'chat', 'away', 'xa', 'dnd', 'invisible') and \
config.get_per('accounts', account, 'adjust_priority_with_status'):
return config.get_per('accounts', account, 'autopriority_' + show)
return config.get_per('accounts', account, 'priority')
prio = config.get_per('accounts', account, 'autopriority_' + show)
else:
prio = config.get_per('accounts', account, 'priority')
if prio < -128:
prio = -128
elif prio > 127:
prio = 127
return prio