changeset 3983c75f7987 in /home/hg/repos/gajim
branches: gtk3 details:http://hg.gajim.org/gajim?cmd=changeset;node=3983c75f7987 description: cache jabber servers too in trnasports_cache table so that they are not considered as transports. Fixes #7360
diffstat:
src/common/connection.py | 5 ++++- src/common/logger.py | 7 ++++++- 2 files changed, 10 insertions(+), 2 deletions(-)
diffs (50 lines):
diff -r 41f05309aca1 -r 3983c75f7987 src/common/connection.py --- a/src/common/connection.py Sun May 26 12:58:19 2013 +0200 +++ b/src/common/connection.py Sun Jun 02 21:02:33 2013 +0200 @@ -1845,11 +1845,14 @@ if 'category' in identity and identity['category'] in ('gateway', 'headline') and 'type' in identity: transport_type = identity['type'] + if 'category' in identity and identity['category'] == 'server' and \ + 'type' in identity and identity['type'] == 'im': + transport_type = 'jabber' # it's a jabber server if 'category' in identity and identity['category'] == 'conference' \ and 'type' in identity and identity['type'] == 'text': is_muc = True
- if transport_type and obj.fjid not in gajim.transport_type: + if transport_type != '' and obj.fjid not in gajim.transport_type: gajim.transport_type[obj.fjid] = transport_type gajim.logger.save_transport_type(obj.fjid, transport_type)
diff -r 41f05309aca1 -r 3983c75f7987 src/common/logger.py --- a/src/common/logger.py Sun May 26 12:58:19 2013 +0200 +++ b/src/common/logger.py Sun Jun 02 21:02:33 2013 +0200 @@ -92,7 +92,8 @@ self.TYPE_RSS, self.TYPE_WEATHER, self.TYPE_MRIM, - ) = range(14) + self.TYPE_NO_TRANSPORT, + ) = range(15)
( self.SUBSCRIPTION_NONE, @@ -339,6 +340,8 @@ return constants.TYPE_WEATHER if type_ == 'mrim': return constants.TYPE_MRIM + if type_ == 'jabber': + return constants.TYPE_NO_TRANSPORT return None
def convert_api_values_to_human_transport_type(self, type_id): @@ -373,6 +376,8 @@ return 'weather' if type_id == constants.TYPE_MRIM: return 'mrim' + if type_id == constants.TYPE_NO_TRANSPORT: + return 'jabber'
def convert_human_subscription_values_to_db_api_values(self, sub): """