Yann Leboulanger pushed to branch gajim_0.16 at gajim / gajim

Commits:
5811df34 by Yann Leboulanger at 2017-07-24T21:48:46+02:00
limit priority value inc ase user set an invalid priority in ACE. Fixes #8630

- - - - -


1 changed file:

- src/common/gajim.py


Changes:

=====================================
src/common/gajim.py
=====================================
--- a/src/common/gajim.py
+++ b/src/common/gajim.py
@@ -481,5 +481,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



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/commit/5811df34ce2fe5483bb3a7cef32b93f1898e8b95
_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to