don't allow sending messages via local account when offline or invisible
This commit is contained in:
parent
d98263c5e8
commit
18ef6edb74
2 changed files with 5 additions and 1 deletions
|
@ -329,7 +329,8 @@ class Interface:
|
||||||
# Inform all controls for this account of the connection state change
|
# Inform all controls for this account of the connection state change
|
||||||
for ctrl in self.msg_win_mgr.get_controls():
|
for ctrl in self.msg_win_mgr.get_controls():
|
||||||
if ctrl.account == account:
|
if ctrl.account == account:
|
||||||
if status == 'offline':
|
if status == 'offline' or (status == 'invisible' and \
|
||||||
|
gajim.connections[account].is_zeroconf):
|
||||||
ctrl.got_disconnected()
|
ctrl.got_disconnected()
|
||||||
else:
|
else:
|
||||||
# Other code rejoins all GCs, so we don't do it here
|
# Other code rejoins all GCs, so we don't do it here
|
||||||
|
|
|
@ -3120,6 +3120,9 @@ _('If "%s" accepts this request you will know his or her status.') % jid)
|
||||||
# last message is long time ago
|
# last message is long time ago
|
||||||
gajim.last_message_time[account][ctrl.get_full_jid()] = 0
|
gajim.last_message_time[account][ctrl.get_full_jid()] = 0
|
||||||
win.set_active_tab(fjid, account)
|
win.set_active_tab(fjid, account)
|
||||||
|
if gajim.connections[account].is_zeroconf and \
|
||||||
|
gajim.connections[account].status in ('offline', 'invisible'):
|
||||||
|
win.get_control(fjid, account).got_disconnected()
|
||||||
win.window.present()
|
win.window.present()
|
||||||
|
|
||||||
def on_roster_treeview_row_activated(self, widget, path, col = 0):
|
def on_roster_treeview_row_activated(self, widget, path, col = 0):
|
||||||
|
|
Loading…
Add table
Reference in a new issue