From 125addc5423b13259229070fe4336c82a8fc30b0 Mon Sep 17 00:00:00 2001 From: Goffi Date: Fri, 27 Nov 2020 16:29:06 +0100 Subject: [PATCH] plugin XEP-0077: use `xmpp_domain` when set for `host` --- sat/plugins/plugin_xep_0077.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sat/plugins/plugin_xep_0077.py b/sat/plugins/plugin_xep_0077.py index aa48aaba..5ee473a2 100644 --- a/sat/plugins/plugin_xep_0077.py +++ b/sat/plugins/plugin_xep_0077.py @@ -250,16 +250,18 @@ class XEP_0077(object): 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)