cache jabber servers too in trnasports_cache table so that they are not considered as transports. Fixes #7360
This commit is contained in:
parent
ae51adcee2
commit
cd92ce9933
|
@ -1845,11 +1845,14 @@ class Connection(CommonConnection, ConnectionHandlers):
|
||||||
if 'category' in identity and identity['category'] in ('gateway',
|
if 'category' in identity and identity['category'] in ('gateway',
|
||||||
'headline') and 'type' in identity:
|
'headline') and 'type' in identity:
|
||||||
transport_type = identity['type']
|
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' \
|
if 'category' in identity and identity['category'] == 'conference' \
|
||||||
and 'type' in identity and identity['type'] == 'text':
|
and 'type' in identity and identity['type'] == 'text':
|
||||||
is_muc = True
|
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.transport_type[obj.fjid] = transport_type
|
||||||
gajim.logger.save_transport_type(obj.fjid, transport_type)
|
gajim.logger.save_transport_type(obj.fjid, transport_type)
|
||||||
|
|
||||||
|
|
|
@ -92,7 +92,8 @@ class Constants:
|
||||||
self.TYPE_RSS,
|
self.TYPE_RSS,
|
||||||
self.TYPE_WEATHER,
|
self.TYPE_WEATHER,
|
||||||
self.TYPE_MRIM,
|
self.TYPE_MRIM,
|
||||||
) = range(14)
|
self.TYPE_NO_TRANSPORT,
|
||||||
|
) = range(15)
|
||||||
|
|
||||||
(
|
(
|
||||||
self.SUBSCRIPTION_NONE,
|
self.SUBSCRIPTION_NONE,
|
||||||
|
@ -339,6 +340,8 @@ class Logger:
|
||||||
return constants.TYPE_WEATHER
|
return constants.TYPE_WEATHER
|
||||||
if type_ == 'mrim':
|
if type_ == 'mrim':
|
||||||
return constants.TYPE_MRIM
|
return constants.TYPE_MRIM
|
||||||
|
if type_ == 'jabber':
|
||||||
|
return constants.TYPE_NO_TRANSPORT
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def convert_api_values_to_human_transport_type(self, type_id):
|
def convert_api_values_to_human_transport_type(self, type_id):
|
||||||
|
@ -373,6 +376,8 @@ class Logger:
|
||||||
return 'weather'
|
return 'weather'
|
||||||
if type_id == constants.TYPE_MRIM:
|
if type_id == constants.TYPE_MRIM:
|
||||||
return 'mrim'
|
return 'mrim'
|
||||||
|
if type_id == constants.TYPE_NO_TRANSPORT:
|
||||||
|
return 'jabber'
|
||||||
|
|
||||||
def convert_human_subscription_values_to_db_api_values(self, sub):
|
def convert_human_subscription_values_to_db_api_values(self, sub):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue