Prevent join groupchat (using local account). Fixes #6849
This commit is contained in:
parent
357a2a5b2b
commit
5fd0e076bd
|
@ -2466,6 +2466,10 @@ class JoinGroupchatWindow:
|
||||||
|
|
||||||
if self.automatic:
|
if self.automatic:
|
||||||
gajim.automatic_rooms[self.account][room_jid] = self.automatic
|
gajim.automatic_rooms[self.account][room_jid] = self.automatic
|
||||||
|
if gajim.connections[self.account].is_zeroconf:
|
||||||
|
ErrorDialog(_('Impossible join groupchat'),
|
||||||
|
_('local account does not support groupchats.'))
|
||||||
|
return
|
||||||
gajim.interface.join_gc_room(self.account, room_jid, nickname, password)
|
gajim.interface.join_gc_room(self.account, room_jid, nickname, password)
|
||||||
|
|
||||||
self.window.destroy()
|
self.window.destroy()
|
||||||
|
|
|
@ -339,7 +339,8 @@ class GajimRemote:
|
||||||
Print retrieved result to the output
|
Print retrieved result to the output
|
||||||
"""
|
"""
|
||||||
if res is not None:
|
if res is not None:
|
||||||
if self.command in ('open_chat', 'send_chat_message', 'send_single_message', 'start_chat'):
|
if self.command in ('open_chat', 'send_chat_message',
|
||||||
|
'send_single_message', 'start_chat'):
|
||||||
if self.command in ('send_message', 'send_single_message'):
|
if self.command in ('send_message', 'send_single_message'):
|
||||||
self.argv_len -= 2
|
self.argv_len -= 2
|
||||||
|
|
||||||
|
|
|
@ -1897,8 +1897,8 @@ class GroupchatControl(ChatControlBase):
|
||||||
# logs. We do it only when connected because if connection was lost
|
# logs. We do it only when connected because if connection was lost
|
||||||
# there may be new messages since disconnection.
|
# there may be new messages since disconnection.
|
||||||
gajim.connections[self.account].gc_got_disconnected(self.room_jid)
|
gajim.connections[self.account].gc_got_disconnected(self.room_jid)
|
||||||
gajim.connections[self.account].send_gc_status(self.nick, self.room_jid,
|
gajim.connections[self.account].send_gc_status(self.nick,
|
||||||
show='offline', status=status)
|
self.room_jid, show='offline', status=status)
|
||||||
nick_list = gajim.contacts.get_nick_list(self.account, self.room_jid)
|
nick_list = gajim.contacts.get_nick_list(self.account, self.room_jid)
|
||||||
for nick in nick_list:
|
for nick in nick_list:
|
||||||
# Update pm chat window
|
# Update pm chat window
|
||||||
|
|
|
@ -901,10 +901,16 @@ class SignalObject(dbus.service.Object):
|
||||||
accounts = gajim.connections.keys()
|
accounts = gajim.connections.keys()
|
||||||
for acct in accounts:
|
for acct in accounts:
|
||||||
if gajim.account_is_connected(acct):
|
if gajim.account_is_connected(acct):
|
||||||
|
if not gajim.connections[acct].is_zeroconf:
|
||||||
account = acct
|
account = acct
|
||||||
break
|
break
|
||||||
if not account:
|
if not account:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if gajim.connections[account].is_zeroconf:
|
||||||
|
# zeroconf not support groupchats
|
||||||
|
return
|
||||||
|
|
||||||
if not nick:
|
if not nick:
|
||||||
nick = ''
|
nick = ''
|
||||||
gajim.interface.instances[account]['join_gc'] = \
|
gajim.interface.instances[account]['join_gc'] = \
|
||||||
|
|
Loading…
Reference in New Issue