comparison sat/core/xmpp.py @ 2594:59ba387c17ea

core (xmpp): use "phone" type in identities when backend is started from Android
author Goffi <goffi@goffi.org>
date Fri, 25 May 2018 10:52:01 +0200
parents 26edcf3a30eb
children 93d64ce7a429
comparison
equal deleted inserted replaced
2593:d78eff6b4487 2594:59ba387c17ea
470 if sys.platform == "android": 470 if sys.platform == "android":
471 # FIXME: temporary hack as SRV is not working on android 471 # FIXME: temporary hack as SRV is not working on android
472 # TODO: remove this hack and fix SRV 472 # TODO: remove this hack and fix SRV
473 log.info(u"FIXME: Android hack, ignoring SRV") 473 log.info(u"FIXME: Android hack, ignoring SRV")
474 host = user_jid.host 474 host = user_jid.host
475 # for now we consider Android devices to be always phones
476 self.identities = [disco.DiscoIdentity(u"client", u"phone", C.APP_NAME)]
475 477
476 hosts_map = host_app.memory.getConfig(None, "hosts_dict", {}) 478 hosts_map = host_app.memory.getConfig(None, "hosts_dict", {})
477 if host is None and user_jid.host in hosts_map: 479 if host is None and user_jid.host in hosts_map:
478 host_data = hosts_map[user_jid.host] 480 host_data = hosts_map[user_jid.host]
479 if isinstance(host_data, basestring): 481 if isinstance(host_data, basestring):