Yann Leboulanger pushed to branch master at gajim / gajim

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

- - - - -


1 changed file:

- gajim/common/gajim.py


Changes:

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



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

Reply via email to