mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-03-11 09:04:54 +00:00
ejabberd: Set mod_mam default to always
This helps various clients to use MAM. Fixes: #2338 Tests: - Functional tests for ejabberd pass. - Install ejabberd and enable MAM. Check that default is set to always in the configuration. - Without this change, install ejabberd and enable MAM. Then restart plinth with this change. The configuration is changed from never to always. After several minutes, ejabberd is running again. Signed-off-by: James Valleroy <jvalleroy@mailbox.org> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
parent
a87c3b102e
commit
33b41a66c3
@ -50,7 +50,7 @@ class EjabberdApp(app_module.App):
|
||||
|
||||
app_id = 'ejabberd'
|
||||
|
||||
_version = 8
|
||||
_version = 9
|
||||
|
||||
def __init__(self) -> None:
|
||||
"""Create components for the app."""
|
||||
@ -159,6 +159,10 @@ class EjabberdApp(app_module.App):
|
||||
'turn-ejabberd').get_configuration()
|
||||
update_turn_configuration(configuration, force=True)
|
||||
|
||||
if old_version and old_version < 9 and privileged.mam('status'):
|
||||
# Re-enable to change configuration
|
||||
privileged.mam('enable')
|
||||
|
||||
|
||||
class EjabberdTurnConsumer(TurnConsumer):
|
||||
"""Component to manage Coturn configuration for ejabberd."""
|
||||
|
||||
@ -261,7 +261,7 @@ def mam(command: str) -> bool | None:
|
||||
'mod_mam': {
|
||||
'db_type':
|
||||
'mnesia', # default is 'mnesia' (w/o set default_db)
|
||||
'default': 'never', # policy, default 'never'
|
||||
'default': 'always', # helps various clients to use mam
|
||||
'request_activates_archiving': False, # default False
|
||||
'assume_mam_usage': False, # for non-ack'd msgs, default False
|
||||
'cache_size': 1000, # default is 1000 items
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user