3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-26 05:49:25 +01:00

don't trigger auto-away if the client is already away

This commit is contained in:
Shivaram Lingamneni 2020-07-20 17:05:29 -04:00
parent 6916dbeae0
commit eaae3165f2

View File

@ -1287,7 +1287,8 @@ func (client *Client) destroy(session *Session) {
autoAway := false
var awayMessage string
if alwaysOn && remainingSessions == 0 && persistenceEnabled(config.Accounts.Multiclient.AutoAway, client.accountSettings.AutoAway) {
if alwaysOn && !client.away && remainingSessions == 0 &&
persistenceEnabled(config.Accounts.Multiclient.AutoAway, client.accountSettings.AutoAway) {
autoAway = true
client.autoAway = true
client.away = true