Fix #295: Prosody: disabling message carbons for anonymous users.

Anonymous users can't use carbons, as they cannot connect with multiple
tabs on the same anonymous account.
So we disable carbons on the anonymous virtualhost, to improve
performances.

See here for some performances tests: https://github.com/JohnXLivingston/livechat-perf-test/tree/main/tests/50-anonymous-carbons
This commit is contained in:
John Livingston
2024-02-01 15:20:52 +01:00
parent 2b1e0fd3e9
commit c008e84da7
2 changed files with 4 additions and 0 deletions

View File

@ -211,6 +211,9 @@ class ProsodyConfigContent {
this.anon = new ProsodyConfigVirtualHost('anon.' + this.prosodyDomain)
this.anon.set('authentication', 'anonymous')
this.anon.set('modules_enabled', ['ping'])
this.anon.set('modules_disabled', [
'carbons' // carbon make no sense for anonymous users, they can't have multiple windows
])
if (autoBanIP) {
this.anon.add('modules_enabled', 'muc_ban_ip')
}