Mercurial > libervia-backend
comparison sat/core/xmpp.py @ 2596:93d64ce7a429
core (xmpp): fixed "Force server" param on Android
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 25 May 2018 10:52:01 +0200 |
parents | 59ba387c17ea |
children | 56f94936df1e |
comparison
equal
deleted
inserted
replaced
2595:973d4551ffae | 2596:93d64ce7a429 |
---|---|
469 self.identities = [disco.DiscoIdentity(u"client", u"pc", C.APP_NAME)] | 469 self.identities = [disco.DiscoIdentity(u"client", u"pc", C.APP_NAME)] |
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 if host is None: |
475 host = user_jid.host | |
475 # for now we consider Android devices to be always phones | 476 # for now we consider Android devices to be always phones |
476 self.identities = [disco.DiscoIdentity(u"client", u"phone", C.APP_NAME)] | 477 self.identities = [disco.DiscoIdentity(u"client", u"phone", C.APP_NAME)] |
477 | 478 |
478 hosts_map = host_app.memory.getConfig(None, "hosts_dict", {}) | 479 hosts_map = host_app.memory.getConfig(None, "hosts_dict", {}) |
479 if host is None and user_jid.host in hosts_map: | 480 if host is None and user_jid.host in hosts_map: |