Bot must be admin on the MUC component.
This commit is contained in:
parent
e0c31f09aa
commit
9e7d9c6069
@ -217,6 +217,13 @@ class BotConfiguration {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the moderation bot JID
|
||||||
|
*/
|
||||||
|
public moderationBotJID (): string {
|
||||||
|
return 'moderator@' + this.botsDomain
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* frees the singleton
|
* frees the singleton
|
||||||
*/
|
*/
|
||||||
|
@ -439,6 +439,9 @@ class ProsodyConfigContent {
|
|||||||
this.bot.set('modules_enabled', ['ping'])
|
this.bot.set('modules_enabled', ['ping'])
|
||||||
this.bot.set('authentication', 'peertubelivechat_bot')
|
this.bot.set('authentication', 'peertubelivechat_bot')
|
||||||
|
|
||||||
|
// Adding the moderation bot as admin to the muc component.
|
||||||
|
this.muc.add('admins', BotConfiguration.singleton().moderationBotJID())
|
||||||
|
|
||||||
const configurationPaths = BotConfiguration.singleton().configurationPaths()
|
const configurationPaths = BotConfiguration.singleton().configurationPaths()
|
||||||
if (configurationPaths.moderation?.globalDir) {
|
if (configurationPaths.moderation?.globalDir) {
|
||||||
this.bot.set('livechat_bot_conf_folder', configurationPaths.moderation.globalDir)
|
this.bot.set('livechat_bot_conf_folder', configurationPaths.moderation.globalDir)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user