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
No known key found for this signature in database
GPG Key ID: B17B5640CE66CDBC
2 changed files with 4 additions and 0 deletions

View File

@ -17,6 +17,7 @@
* Using patched ConverseJS for performance improvement (related to #96):
* debounce MUC sidebar rendering in ConverseJS (Fix #138)
* force history pruning, even if messages keep coming (Fix #140)
* Prosody: disabling message carbons for anonymous users (See #295)
## 8.0.4

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')
}