Skip to content
Snippets Groups Projects
Commit f36860e3 authored by Weblate's avatar Weblate
Browse files

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

parent 5e63461e
No related branches found
No related tags found
No related merge requests found
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment