Philipp Hörist pushed to branch master at gajim / gajim
Commits:
1d11e066 by Philipp Hörist at 2018-12-03T13:17:46Z
Fix error when creating MUC
Fixes #9473
- - - - -
1 changed file:
- gajim/common/helpers.py
Changes:
=====================================
gajim/common/helpers.py
=====================================
@@ -56,7 +56,6 @@ from gajim.common import configpaths
from gajim.common.i18n import Q_
from gajim.common.i18n import _
from gajim.common.i18n import ngettext
-from gajim.common.caps_cache import muc_caps_cache
log = logging.getLogger('gajim.c.helpers')
@@ -1450,8 +1449,9 @@ def call_counter(func):
return helper
def get_sync_threshold(jid, archive_info):
+ cache = caps_cache.muc_caps_cache
if archive_info is None or archive_info.sync_threshold is None:
- if muc_caps_cache.supports(jid, 'muc#roomconfig_membersonly'):
+ if cache.supports(jid, 'muc#roomconfig_membersonly'):
threshold = app.config.get('private_room_sync_threshold')
else:
threshold = app.config.get('public_room_sync_threshold')
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/1d11e06647152ad29bb78253678a1471af…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/1d11e06647152ad29bb78253678a1471af…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
91ebe373 by Philipp Hörist at 2018-11-27T20:04:13Z
AccountsWindow: Fix back button
- - - - -
1 changed file:
- gajim/gtk/accounts.py
Changes:
=====================================
gajim/gtk/accounts.py
=====================================
@@ -80,6 +80,10 @@ class AccountsWindow(Gtk.ApplicationWindow):
app.ged.register_event_handler(
'our-show', ged.GUI2, self._nec_our_status)
+ @property
+ def stack(self):
+ return self._ui.stack
+
def _nec_our_status(self, event):
self.update_accounts()
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/91ebe37359419c97f1a0c995c1e9e62a3b…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/91ebe37359419c97f1a0c995c1e9e62a3b…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / python-nbxmpp
Commits:
07355321 by Philipp Hörist at 2018-11-27T19:16:24Z
Dont inherit from object
This is only needed for python2 compatibility
- - - - -
10 changed files:
- nbxmpp/bosh.py
- nbxmpp/client_nb.py
- nbxmpp/dispatcher_nb.py
- nbxmpp/idlequeue.py
- nbxmpp/plugin.py
- nbxmpp/protocol.py
- nbxmpp/proxy_connectors.py
- nbxmpp/simplexml.py
- nbxmpp/stringprepare.py
- nbxmpp/tls_nb.py
Changes:
=====================================
nbxmpp/bosh.py
=====================================
@@ -493,7 +493,7 @@ def get_rand_number():
return int(binascii.hexlify(os.urandom(6)), 16)
-class AckChecker(object):
+class AckChecker:
"""
Class for generating rids and generating and checking acknowledgements in
BOSH messages
@@ -536,7 +536,7 @@ class AckChecker(object):
return self.rid
-class KeyStack(object):
+class KeyStack:
"""
Class implementing key sequences for BOSH messages
"""
=====================================
nbxmpp/client_nb.py
=====================================
@@ -34,7 +34,7 @@ from .const import Event
log = logging.getLogger('nbxmpp.client_nb')
-class NonBlockingClient(object):
+class NonBlockingClient:
"""
Client class is XMPP connection mountpoint. Objects for authentication,
network communication, roster, xml parsing ... are plugged to client object.
=====================================
nbxmpp/dispatcher_nb.py
=====================================
@@ -41,7 +41,7 @@ DEFAULT_TIMEOUT_SECONDS = 25
XML_DECLARATION = '<?xml version=\'1.0\'?>'
# FIXME: ugly
-class Dispatcher(object):
+class Dispatcher:
"""
Why is this here - I needed to redefine Dispatcher for BOSH and easiest way
was to inherit original Dispatcher (now renamed to XMPPDispatcher). Trouble
=====================================
nbxmpp/idlequeue.py
=====================================
@@ -63,7 +63,7 @@ def get_idlequeue():
return SelectIdleQueue()
-class IdleObject(object):
+class IdleObject:
"""
Idle listener interface. Listed methods are called by IdleQueue.
"""
@@ -203,7 +203,7 @@ class IdleCommand(IdleObject):
self._return_result()
-class IdleQueue(object):
+class IdleQueue:
"""
IdleQueue provide three distinct time based features. Uses select.poll()
=====================================
nbxmpp/plugin.py
=====================================
@@ -20,7 +20,7 @@ import logging
log = logging.getLogger('nbxmpp.plugin')
-class PlugIn(object):
+class PlugIn:
"""
Abstract xmpppy plugin infrastructure code, providing plugging in/out and
debugging functionality
=====================================
nbxmpp/protocol.py
=====================================
@@ -638,7 +638,7 @@ stream_exceptions = {'bad-format': BadFormat,
'xml-not-well-formed': XMLNotWellFormed}
-class JID(object):
+class JID:
"""
JID can be built from string, modified, compared, serialised into string
"""
=====================================
nbxmpp/proxy_connectors.py
=====================================
@@ -30,7 +30,7 @@ from base64 import b64encode
log = logging.getLogger('nbxmpp.proxy_connectors')
-class ProxyConnector(object):
+class ProxyConnector:
"""
Interface for proxy-connecting object - when tunnneling XMPP over proxies,
some connecting process usually has to be done before opening stream. Proxy
=====================================
nbxmpp/simplexml.py
=====================================
@@ -32,7 +32,7 @@ def XMLescape(txt):
# replace also FORM FEED and ESC, because they are not valid XML chars
return txt.replace("&", "&").replace("<", "<").replace(">", ">").replace('"', """).replace('\x0C', "").replace('\x1B', "")
-class Node(object):
+class Node:
"""
Node class describes syntax of separate XML Node. It have a constructor that
permits node creation from set of "namespace name", attributes and payload
@@ -471,7 +471,7 @@ class Node(object):
raise AttributeError
-class T(object):
+class T:
"""
Auxiliary class used to quick access to node's child nodes
"""
@@ -506,7 +506,7 @@ class NT(T):
return self.node.addChild(attr, payload=[val])
-class NodeBuilder(object):
+class NodeBuilder:
"""
Builds a Node class minidom from data parsed to it. This class used for two
purposes:
=====================================
nbxmpp/stringprepare.py
=====================================
@@ -26,7 +26,7 @@ import unicodedata
from encodings import idna
-class ILookupTable(object):
+class ILookupTable:
"""
Interface for character lookup classes
"""
@@ -38,7 +38,7 @@ class ILookupTable(object):
pass
-class IMappingTable(object):
+class IMappingTable:
"""
Interface for character mapping classes
"""
@@ -50,14 +50,14 @@ class IMappingTable(object):
pass
-class LookupTableFromFunction(object):
+class LookupTableFromFunction:
__implements__ = ILookupTable
def __init__(self, in_table_function):
self.lookup = in_table_function
-class LookupTable(object):
+class LookupTable:
__implements__ = ILookupTable
def __init__(self, table):
@@ -67,14 +67,14 @@ class LookupTable(object):
return c in self._table
-class MappingTableFromFunction(object):
+class MappingTableFromFunction:
__implements__ = IMappingTable
def __init__(self, map_table_function):
self.map = map_table_function
-class EmptyMappingTable(object):
+class EmptyMappingTable:
__implements__ = IMappingTable
def __init__(self, in_table_function):
@@ -87,7 +87,7 @@ class EmptyMappingTable(object):
return c
-class Profile(object):
+class Profile:
def __init__(self, mappings=None, normalize=True, prohibiteds=None,
check_unassigneds=True, check_bidi=True):
if mappings is None:
@@ -161,7 +161,7 @@ class Profile(object):
raise UnicodeError("Violation of BIDI Requirement 3")
-class NamePrep(object):
+class NamePrep:
"""
Implements preparation of internationalized domain names
=====================================
nbxmpp/tls_nb.py
=====================================
@@ -52,7 +52,7 @@ def gattr(obj, attr, default=None):
return default
-class SSLWrapper(object):
+class SSLWrapper:
"""
Abstract SSLWrapper base class
"""
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/commit/073553215d153ff1f3991a2234…
--
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/commit/073553215d153ff1f3991a2234…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
f1ab9fb6 by Philipp Hörist at 2018-11-27T18:23:34Z
Fix connection resume
Fixes #9458
- - - - -
1 changed file:
- gajim/common/connection.py
Changes:
=====================================
gajim/common/connection.py
=====================================
@@ -670,7 +670,7 @@ class Connection(CommonConnection, ConnectionHandlers):
self.old_show = app.SHOW_LIST[self.connected]
self.connected = 0
if not self.on_purpose:
- if not self.connection.resume_supported:
+ if not self._sm_resume_data:
app.nec.push_incoming_event(OurShowEvent(None, conn=self,
show='offline'))
else:
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/f1ab9fb6838f2a8a36370e404937c746b0…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/f1ab9fb6838f2a8a36370e404937c746b0…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / python-nbxmpp
Commits:
39738213 by Philipp Hörist at 2018-11-27T17:52:42Z
Fix sm resume
- - - - -
2 changed files:
- nbxmpp/client_nb.py
- nbxmpp/smacks.py
Changes:
=====================================
nbxmpp/client_nb.py
=====================================
@@ -586,10 +586,9 @@ class NonBlockingClient(object):
elif self.SASL.startsasl == 'success':
self.connected += '+sasl'
self.Dispatcher.Event(Realm.CONNECTING, Event.AUTH_SUCCESSFUL)
+ self._owner.Smacks.register_handlers()
def bind(self):
- self._owner.Smacks.register_handlers()
-
# Check if we can resume
if self._owner.Smacks.resume_supported:
self._owner.Smacks.resume_request()
=====================================
nbxmpp/smacks.py
=====================================
@@ -279,7 +279,7 @@ class Smacks(PlugIn):
self._owner.Dispatcher.Event(Realm.CONNECTING, Event.RESUME_FAILED)
# We failed while resuming
self.resume_supported = False
- self._owner.start_bind()
+ self._owner.bind()
self._reset_state()
def _reset_state(self):
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/commit/397382139300c7b992934c6c3e…
--
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/commit/397382139300c7b992934c6c3e…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
f942e2c7 by Andrey Gursky at 2018-11-27T01:17:25Z
Fix receipts for chat
This is a regression from e3050697
- - - - -
1 changed file:
- gajim/common/modules/receipts.py
Changes:
=====================================
gajim/common/modules/receipts.py
=====================================
@@ -78,7 +78,7 @@ class Receipts:
event.resource)
contact = app.contacts.get_contact(self._account, event.jid)
- if contact is None and contact.sub not in ('to', 'none'):
+ if contact is not None and contact.sub not in ('to', 'none'):
return contact
@staticmethod
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/f942e2c70faf2229a59a24b8293712ac79…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/f942e2c70faf2229a59a24b8293712ac79…
You're receiving this email because of your account on dev.gajim.org.