[andreas] don't change status message when we go auto away and no autoaway status message is defined. Same thing for autoXA. fixes #2994
This commit is contained in:
parent
bbed22a410
commit
738da72f5a
1 changed files with 8 additions and 4 deletions
12
src/gajim.py
12
src/gajim.py
|
@ -1675,16 +1675,20 @@ class Interface:
|
||||||
gajim.status_before_autoaway[account] = \
|
gajim.status_before_autoaway[account] = \
|
||||||
gajim.connections[account].status
|
gajim.connections[account].status
|
||||||
# we go away (no auto status) [we pass True to auto param]
|
# we go away (no auto status) [we pass True to auto param]
|
||||||
self.roster.send_status(account, 'away',
|
auto_message = gajim.config.get('autoaway_message')
|
||||||
gajim.config.get('autoaway_message'), auto=True)
|
if not auto_message:
|
||||||
|
auto_message = gajim.connections[account].status
|
||||||
|
self.roster.send_status(account, 'away', auto_message, auto=True)
|
||||||
gajim.sleeper_state[account] = 'autoaway'
|
gajim.sleeper_state[account] = 'autoaway'
|
||||||
elif state == common.sleepy.STATE_XA and (\
|
elif state == common.sleepy.STATE_XA and (\
|
||||||
gajim.sleeper_state[account] == 'autoaway' or \
|
gajim.sleeper_state[account] == 'autoaway' or \
|
||||||
gajim.sleeper_state[account] == 'online') and \
|
gajim.sleeper_state[account] == 'online') and \
|
||||||
gajim.config.get('autoxa'):
|
gajim.config.get('autoxa'):
|
||||||
# we go extended away [we pass True to auto param]
|
# we go extended away [we pass True to auto param]
|
||||||
self.roster.send_status(account, 'xa',
|
auto_message = gajim.config.get('autoxa_message')
|
||||||
gajim.config.get('autoxa_message'), auto=True)
|
if not auto_message:
|
||||||
|
auto_message = gajim.connections[account].status
|
||||||
|
self.roster.send_status(account, 'xa', auto_message, auto=True)
|
||||||
gajim.sleeper_state[account] = 'autoxa'
|
gajim.sleeper_state[account] = 'autoxa'
|
||||||
return True # renew timeout (loop for ever)
|
return True # renew timeout (loop for ever)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue