New API was introduced in ruamel.yaml 0.15.0:
https://yaml.readthedocs.io/en/latest/api.html
Set allow_duplicate_keys to true to avoid error when parsing
ejabberd.yaml.
Tested ejabberd install on unstable, testing, and stable.
Closes: #1888.
Additional tests:
- Install the app. It will contain configuration related to LDAP and SSL
certificates.
- Add a domain to FreedomBox it will show up in the configuration.
- Add a domain that is already present in the configuration file. It will not be
added again.
- Enable/disable MAM. The configuration is updated accordingly.
- Login via JSXC and send simple messages across two users.
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Tested-by: Sunil Mohan Adapa <sunil@medhas.org>
Debian has a patch to configuration to change port 5443 to 5280 in ejabberd
package version 18.12. However, 5443 is the correct port to host BOSH. So,
change it back. In 19.x, this behavior has changed to use both ports 5443 (for
BOSH) and 5280 (for web administration).
Closes: #1640.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
In the action, the new domain is always extended to the list of domain names
accepted by ejabberd. To simplify domain handling simply use the domain_added
signal.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This is non-essential as there seems to be no problem for ejabberd with
duplicated host names.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This is the default for new installs of ejabberd, starting with
version 18.09-1. For existing installs from previous versions, the
config must be upgraded to use the new port.
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
- Merge config upgrade into setup.
- Try upgrade even if ejabberd version cannot be determined.
- Ignore error from ejabberdctl which can happen if ejabberd is not running.
- Run yapf on modified files.
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
After a user enables/disables MAM, use ejabberd's reload_config instead
of restarting ejabberd.
Please let me know how this looks? Could reload_config also be of use
when adding/dropping a Let's Encrypt certificate?
Fixes#1010
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>