diff --git a/plinth/modules/xmpp/templates/xmpp.html b/plinth/modules/xmpp/templates/xmpp.html index 999b11dfa..00fe55bb2 100644 --- a/plinth/modules/xmpp/templates/xmpp.html +++ b/plinth/modules/xmpp/templates/xmpp.html @@ -31,6 +31,11 @@ any other XMPP client .
+Your XMPP server domain is set to {{ status.domainname }}. User IDs + will look like username@{{ status.domainname }}. You can setup your + domain on the system Configure + page.
+ diff --git a/plinth/modules/xmpp/views.py b/plinth/modules/xmpp/views.py index c4d7f2f3b..c96eb7f2a 100644 --- a/plinth/modules/xmpp/views.py +++ b/plinth/modules/xmpp/views.py @@ -34,10 +34,14 @@ from plinth.modules import xmpp logger = logging.getLogger(__name__) +def get_domainname(): + """Return the domainname""" + fqdn = socket.getfqdn() + return '.'.join(fqdn.split('.')[1:]) + def before_install(): """Preseed debconf values before the packages are installed.""" - fqdn = socket.getfqdn() - domainname = '.'.join(fqdn.split('.')[1:]) + domainname = get_domainname() logger.info('XMPP service domainname - %s', domainname) actions.superuser_run('xmpp', ['pre-install', '--domainname', domainname]) @@ -74,7 +78,8 @@ def index(request): def get_status(): """Get the current settings.""" status = {'enabled': xmpp.is_enabled(), - 'is_running': xmpp.is_running()} + 'is_running': xmpp.is_running(), + 'domainname': get_domainname()} return status