mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
xmpp: Replace jwchat with jsxc
- Update action to not configure jwchat anymore. - Update action to not disable jwchat apache configuration. Since the package is no longer installed, this could cause failures. - Update action to no refer to jwchat in comments. - Update jwchat-plinth Apache configuration to not include jwchat anymore. Keep this file name for now instead of renaming it to jsxc-plinth as this would introduce additional complexity with little benefit. - Install package libjs-jsxc instead of jwchat during xmpp setup. - Create jsxc front page shortcut instead of for jwchat. - Perform diagnostics on /http-bind/ URL needed for jwchat instead of /jwchat. - Update links that launch XMPP web client.
This commit is contained in:
1 parent
e57aa2ae85
commit
305cc3218d
4 files changed
+19
-48
No files matched your search
@@ -19,6 +19,7 @@
|
||||
Plinth module to configure XMPP server
|
||||
"""
|
||||
|
||||
from django.urls import reverse_lazy
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
import logging
|
||||
import socket
|
||||
@@ -38,7 +39,7 @@ depends = ['apps']
|
||||
|
||||
managed_services = ['ejabberd']
|
||||
|
||||
managed_packages = ['jwchat', 'ejabberd']
|
||||
managed_packages = ['libjs-jsxc', 'ejabberd']
|
||||
|
||||
title = _('Chat Server (XMPP)')
|
||||
|
||||
@@ -46,8 +47,7 @@ description = [
|
||||
_('XMPP is an open and standardized communication protocol. Here '
|
||||
'you can run and configure your XMPP server, called ejabberd.'),
|
||||
|
||||
_('To actually communicate, you can use the <a href=\'/jwchat\'>web '
|
||||
'client</a> or any other '
|
||||
_('To actually communicate, you can use the web client or any other '
|
||||
'<a href=\'http://xmpp.org/xmpp-software/clients/\' target=\'_blank\''
|
||||
'>XMPP client</a>.')
|
||||
]
|
||||
@@ -90,8 +90,8 @@ def setup(helper, old_version=None):
|
||||
|
||||
|
||||
def add_shortcut():
|
||||
frontpage.add_shortcut('jwchat', _('Chat Client (JWChat)'), '/jwchat',
|
||||
'glyphicon-comment')
|
||||
frontpage.add_shortcut('jsxc', _('Chat Client (jsxc)'),
|
||||
reverse_lazy('xmpp:jsxc'), 'glyphicon-comment')
|
||||
frontpage.add_shortcut('xmpp', title, None, 'glyphicon-comment',
|
||||
description)
|
||||
|
||||
@@ -117,7 +117,7 @@ def enable():
|
||||
def disable():
|
||||
"""Enable the module."""
|
||||
actions.superuser_run('xmpp', ['disable'])
|
||||
frontpage.remove_shortcut('jwchat')
|
||||
frontpage.remove_shortcut('jsxc')
|
||||
frontpage.remove_shortcut('xmpp')
|
||||
|
||||
|
||||
@@ -135,9 +135,7 @@ def on_pre_hostname_change(sender, old_hostname, new_hostname, **kwargs):
|
||||
|
||||
|
||||
def on_post_hostname_change(sender, old_hostname, new_hostname, **kwargs):
|
||||
"""
|
||||
Update ejabberd and jwchat config after hostname is changed.
|
||||
"""
|
||||
"""Update ejabberd config after hostname change."""
|
||||
del sender # Unused
|
||||
del kwargs # Unused
|
||||
|
||||
@@ -149,9 +147,7 @@ def on_post_hostname_change(sender, old_hostname, new_hostname, **kwargs):
|
||||
|
||||
|
||||
def on_domainname_change(sender, old_domainname, new_domainname, **kwargs):
|
||||
"""
|
||||
Update ejabberd and jwchat config after domain name is changed.
|
||||
"""
|
||||
"""Update ejabberd config after domain name change."""
|
||||
del sender # Unused
|
||||
del old_domainname # Unused
|
||||
del kwargs # Unused
|
||||
@@ -172,6 +168,7 @@ def diagnose():
|
||||
results.append(action_utils.diagnose_port_listening(5269, 'tcp6'))
|
||||
results.append(action_utils.diagnose_port_listening(5280, 'tcp4'))
|
||||
results.append(action_utils.diagnose_port_listening(5280, 'tcp6'))
|
||||
results.extend(action_utils.diagnose_url_on_all('http://{host}/jwchat'))
|
||||
results.extend(
|
||||
action_utils.diagnose_url_on_all('http://{host}/http-bind/'))
|
||||
|
||||
return results
|
||||
@@ -37,7 +37,7 @@
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href='/jwchat' target='_blank' class='btn btn-primary'>
|
||||
<a href='{% url "xmpp:jsxc" %}' target='_blank' class='btn btn-primary'>
|
||||
{% trans "Launch web client" %}</a>
|
||||
</p>
|
||||
{% endblock %}
|
||||
Reference in new issue
Block a user