# HG changeset patch # User Goffi # Date 1606490946 -3600 # Node ID 8c25489bb79c822a1e4e504a410b1e00d18ed38b # Parent 829fee17460680af423d506b5cb482fdfcadce22 plugin XEP-0077: use `xmpp_domain` when set for `host` diff -r 829fee174606 -r 8c25489bb79c sat/plugins/plugin_xep_0077.py --- a/sat/plugins/plugin_xep_0077.py Fri Nov 27 16:26:36 2020 +0100 +++ b/sat/plugins/plugin_xep_0077.py Fri Nov 27 16:29:06 2020 +0100 @@ -250,16 +250,18 @@ return self.registerNewAccount(jid.JID(jid_), password, **kwargs) def registerNewAccount( - self, jid_, password, email=None, host="127.0.0.1", port=C.XMPP_C2S_PORT + self, jid_, password, email=None, host=None, port=C.XMPP_C2S_PORT ): """register a new account on a XMPP server @param jid_(jid.JID): request jid to register @param password(unicode): password of the account @param email(unicode): email of the account - @param host(unicode): host of the server to register to + @param host(None, unicode): host of the server to register to @param port(int): port of the server to register to """ + if host is None: + host = self.host.memory.getConfig("", "xmpp_domain", "127.0.0.1") check_certificate = host != "127.0.0.1" authenticator = RegisteringAuthenticator( jid_, password, email, check_certificate=check_certificate)