Builtin Prosody: display random avatars for anonymous users.
This commit is contained in:
@ -60,7 +60,8 @@ async function getProsodyFilePaths (options: RegisterServerOptions): Promise<Pro
|
||||
log: path.resolve(dir, 'prosody.log'),
|
||||
config: path.resolve(dir, 'prosody.cfg.lua'),
|
||||
data: path.resolve(dir, 'data'),
|
||||
modules: path.resolve(__dirname, '../../prosody-modules')
|
||||
modules: path.resolve(__dirname, '../../prosody-modules'),
|
||||
avatars: path.resolve(__dirname, '../../avatars')
|
||||
}
|
||||
}
|
||||
|
||||
@ -153,6 +154,7 @@ async function getProsodyConfig (options: RegisterServerOptions): Promise<Prosod
|
||||
|
||||
config.useListRoomsApi(apikey)
|
||||
config.usePeertubeVCards(basePeertubeUrl)
|
||||
config.useAnonymousRandomVCards(paths.avatars)
|
||||
|
||||
config.useTestModule(apikey, testApiUrl)
|
||||
|
||||
|
@ -308,6 +308,13 @@ class ProsodyConfigContent {
|
||||
}
|
||||
}
|
||||
|
||||
useAnonymousRandomVCards (avatarPath: string): void {
|
||||
if (this.anon) {
|
||||
this.anon.add('modules_enabled', 'random_vcard_peertubelivechat')
|
||||
this.anon.set('peertubelivechat_random_vcard_avatars_path', avatarPath)
|
||||
}
|
||||
}
|
||||
|
||||
setLog (level: ProsodyLogLevel, syslog?: ProsodyLogLevel[]): void {
|
||||
let log = ''
|
||||
log += 'log = {\n'
|
||||
|
@ -6,6 +6,7 @@ interface ProsodyFilePaths {
|
||||
config: string
|
||||
data: string
|
||||
modules: string
|
||||
avatars: string
|
||||
}
|
||||
|
||||
export {
|
||||
|
Reference in New Issue
Block a user