diff options
author | mathieui <mathieui@mathieui.net> | 2018-06-29 21:18:09 +0200 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2018-06-29 21:34:23 +0200 |
commit | 28ce49dcaaa1f7e958e09aff2af7d1e956796ad9 (patch) | |
tree | c1ffc7d4f9909080abd6dd2875a66f948879f00f /poezio/connection.py | |
parent | 39695ba42d9183584edb6c6b93b02b04be67f126 (diff) | |
download | poezio-28ce49dcaaa1f7e958e09aff2af7d1e956796ad9.tar.gz poezio-28ce49dcaaa1f7e958e09aff2af7d1e956796ad9.tar.bz2 poezio-28ce49dcaaa1f7e958e09aff2af7d1e956796ad9.tar.xz poezio-28ce49dcaaa1f7e958e09aff2af7d1e956796ad9.zip |
Update poezio for the new tabs module
Diffstat (limited to 'poezio/connection.py')
-rw-r--r-- | poezio/connection.py | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/poezio/connection.py b/poezio/connection.py index c97365f8..2d6ec2a6 100644 --- a/poezio/connection.py +++ b/poezio/connection.py @@ -81,7 +81,9 @@ class Connection(slixmpp.ClientXMPP): jid = config.get('server') password = None jid = safeJID(jid) - jid.resource = '%s-%s' % (jid.resource, device_id) if jid.resource else 'poezio-%s' % device_id + jid.resource = '%s-%s' % ( + jid.resource, + device_id) if jid.resource else 'poezio-%s' % device_id # TODO: use the system language slixmpp.ClientXMPP.__init__( self, jid, password, lang=config.get('lang')) @@ -107,8 +109,9 @@ class Connection(slixmpp.ClientXMPP): self.auto_authorize = None # prosody defaults, lowest is AES128-SHA, it should be a minimum # for anything that came out after 2002 - self.ciphers = config.get('ciphers', 'HIGH+kEDH:HIGH+kEECDH:HIGH:!PSK' - ':!SRP:!3DES:!aNULL') + self.ciphers = config.get( + 'ciphers', 'HIGH+kEDH:HIGH+kEECDH:HIGH:!PSK' + ':!SRP:!3DES:!aNULL') self.ca_certs = config.get('ca_cert_path') or None interval = config.get('whitespace_interval') if int(interval) > 0: @@ -118,11 +121,17 @@ class Connection(slixmpp.ClientXMPP): self.register_plugin('xep_0004') self.register_plugin('xep_0012') # Must be loaded before 0030. - self.register_plugin('xep_0115', { - 'caps_node': 'https://poez.io', - 'cache': FileSystemCache(CACHE_DIR, 'caps', encode=str, - decode=lambda x: DiscoInfo(ET.fromstring(x))), - }) + self.register_plugin( + 'xep_0115', { + 'caps_node': + 'https://poez.io', + 'cache': + FileSystemCache( + CACHE_DIR, + 'caps', + encode=str, + decode=lambda x: DiscoInfo(ET.fromstring(x))), + }) self.register_plugin('xep_0030') self.register_plugin('xep_0045') self.register_plugin('xep_0048') |