Commit be102de0 authored by thierrytiti's avatar thierrytiti

Bugfix if auto_away=0 and auto_xa>0

In this case, it will force changing presence even if the user
specificly set another status.
parent d631af58
...@@ -376,7 +376,8 @@ ...@@ -376,7 +376,8 @@
$(window).on('beforeunload' , function(){converse.autoAwayReset()}); $(window).on('beforeunload' , function(){converse.autoAwayReset()});
window.setInterval(function () { window.setInterval(function () {
if (converse._idleCounter <= converse.auto_away || (converse.auto_xa>0 && converse._idleCounter <= converse.auto_xa)){ if ((converse._idleCounter <= converse.auto_away || (converse.auto_xa>0 && converse._idleCounter <= converse.auto_xa)) &&
(converse.xmppstatus.get('status') == 'online' && converse._autoAway==0) || (converse.xmppstatus.get('status') == 'away' && converse._autoAway==1) ){
converse._idleCounter++; converse._idleCounter++;
} }
if (converse.auto_away>0 && converse._autoAway!=1 && converse._idleCounter > converse.auto_away && converse._idleCounter <= converse.auto_xa){ if (converse.auto_away>0 && converse._autoAway!=1 && converse._idleCounter > converse.auto_away && converse._idleCounter <= converse.auto_xa){
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment