Using mod_muc_mam:

* Starting with Peertube 3.2.0, builtin prosody save room history on server. So when a user connects, he can get previously send messages.
* Fix: settings archive_expires_after was useless without mod_mam
This commit is contained in:
John Livingston
2021-05-11 16:10:57 +02:00
parent 094193a3b1
commit a602c7870a
3 changed files with 22 additions and 3 deletions

View File

@ -130,7 +130,10 @@ async function getProsodyConfig (options: RegisterServerOptions): Promise<Prosod
config.useHttpAuthentication(authApiUrl)
config.usePeertubeBosh(prosodyDomain, port)
config.useMucHttpDefault(roomApiUrl)
config.setArchive('1w') // Remove archived messages after 1 week
if (paths.permanent) {
// TODO: add a settings so that admin can choose? (on/off and duration)
config.useMam('1w') // Remove archived messages after 1 week
}
config.setLog(process.env.NODE_ENV === 'test' ? 'debug' : 'info')
const content = config.write()