[Dicson] option have moved per account. Fixes #4748
This commit is contained in:
parent
b6b1f2bdb0
commit
ffb52eb626
4 changed files with 10 additions and 7 deletions
|
@ -1622,7 +1622,8 @@ class ChatControl(ChatControlBase):
|
||||||
ChatControlBase.print_conversation_line(self, msg,
|
ChatControlBase.print_conversation_line(self, msg,
|
||||||
'status', '', None)
|
'status', '', None)
|
||||||
|
|
||||||
loggable = gajim.config.get('log_encrypted_sessions')
|
loggable = gajim.config.get_per('accounts', self.account,
|
||||||
|
'log_encrypted_sessions')
|
||||||
|
|
||||||
if self.session:
|
if self.session:
|
||||||
self.session.loggable = loggable
|
self.session.loggable = loggable
|
||||||
|
|
|
@ -1550,7 +1550,7 @@ class ConnectionHandlers(ConnectionVcard, ConnectionBytestream, ConnectionDisco,
|
||||||
qp = iq_obj.getTag('query')
|
qp = iq_obj.getTag('query')
|
||||||
qp.setTagData('name', 'Gajim')
|
qp.setTagData('name', 'Gajim')
|
||||||
qp.setTagData('version', gajim.version)
|
qp.setTagData('version', gajim.version)
|
||||||
send_os = gajim.config.get('send_os_info')
|
send_os = gajim.config.get_per('accounts', self.name, 'send_os_info')
|
||||||
if send_os:
|
if send_os:
|
||||||
qp.setTagData('os', helpers.get_os_info())
|
qp.setTagData('os', helpers.get_os_info())
|
||||||
self.connection.send(iq_obj)
|
self.connection.send(iq_obj)
|
||||||
|
|
|
@ -246,7 +246,7 @@ class EncryptedStanzaSession(StanzaSession):
|
||||||
return crypto.encode_mpi(gajim.pubkey.sign(hash_, '')[0])
|
return crypto.encode_mpi(gajim.pubkey.sign(hash_, '')[0])
|
||||||
|
|
||||||
def encrypt_stanza(self, stanza):
|
def encrypt_stanza(self, stanza):
|
||||||
encryptable = [x for x in stanza.getChildren() if x.getName() not in
|
encryptable = [x for x in stanza.getChildren() if x.getName() not in
|
||||||
('error', 'amp', 'thread')]
|
('error', 'amp', 'thread')]
|
||||||
|
|
||||||
# FIXME can also encrypt contents of <error/> elements in stanzas @type =
|
# FIXME can also encrypt contents of <error/> elements in stanzas @type =
|
||||||
|
@ -353,7 +353,8 @@ class EncryptedStanzaSession(StanzaSession):
|
||||||
return self.decrypter.decrypt(ciphertext)
|
return self.decrypter.decrypt(ciphertext)
|
||||||
|
|
||||||
def logging_preference(self):
|
def logging_preference(self):
|
||||||
if gajim.config.get('log_encrypted_sessions'):
|
if gajim.config.get_per('accounts', self.conn.name,
|
||||||
|
'log_encrypted_sessions'):
|
||||||
return ['may', 'mustnot']
|
return ['may', 'mustnot']
|
||||||
else:
|
else:
|
||||||
return ['mustnot', 'may']
|
return ['mustnot', 'may']
|
||||||
|
@ -989,7 +990,7 @@ class EncryptedStanzaSession(StanzaSession):
|
||||||
def fail_bad_negotiation(self, reason, fields=None):
|
def fail_bad_negotiation(self, reason, fields=None):
|
||||||
'''
|
'''
|
||||||
Sends an error and cancels everything.
|
Sends an error and cancels everything.
|
||||||
|
|
||||||
If fields is None, the remote party has given us a bad cryptographic
|
If fields is None, the remote party has given us a bad cryptographic
|
||||||
value of some kind. Otherwise, list the fields we haven't implemented
|
value of some kind. Otherwise, list the fields we haven't implemented
|
||||||
'''
|
'''
|
||||||
|
|
|
@ -184,8 +184,9 @@ class ChatControlSession(stanza_session.EncryptedStanzaSession):
|
||||||
if not msgtxt: # empty message text
|
if not msgtxt: # empty message text
|
||||||
return
|
return
|
||||||
|
|
||||||
if gajim.config.get('ignore_unknown_contacts') and \
|
if gajim.config.get_per('accounts', self.conn.name,
|
||||||
not gajim.contacts.get_contacts(self.conn.name, jid) and not pm:
|
'ignore_unknown_contacts') and not gajim.contacts.get_contacts(
|
||||||
|
self.conn.name, jid) and not pm:
|
||||||
return
|
return
|
||||||
|
|
||||||
if not contact:
|
if not contact:
|
||||||
|
|
Loading…
Add table
Reference in a new issue