diff --git a/client/@types/global.d.ts b/client/@types/global.d.ts index 9f36709e..cf35c5ce 100644 --- a/client/@types/global.d.ts +++ b/client/@types/global.d.ts @@ -44,3 +44,4 @@ declare const LOC_LIVECHAT_CONFIGURATION_CHANNEL_ENABLE_BOT_LABEL: string declare const LOC_LIVECHAT_CONFIGURATION_CHANNEL_BOT_OPTIONS_TITLE: string declare const LOC_LIVECHAT_CONFIGURATION_CHANNEL_FORBIDDEN_WORDS_LABEL: string declare const LOC_LIVECHAT_CONFIGURATION_CHANNEL_BANNED_JIDS_LABEL: string +declare const LOC_LIVECHAT_CONFIGURATION_CHANNEL_BOT_NICKNAME: string diff --git a/client/common/configuration/logic/channel.ts b/client/common/configuration/logic/channel.ts index feafa6b7..ae38adab 100644 --- a/client/common/configuration/logic/channel.ts +++ b/client/common/configuration/logic/channel.ts @@ -27,6 +27,7 @@ async function vivifyConfigurationChannel ( const data = new FormData(form) const channelConfigurationOptions: ChannelConfigurationOptions = { bot: data.get('bot') === '1', + botNickname: data.get('bot_nickname')?.toString() ?? '', bannedJIDs: (data.get('banned_jids')?.toString() ?? '').split(/\r?\n|\r|\n/g), forbiddenWords: (data.get('forbidden_words')?.toString() ?? '').split(/\r?\n|\r|\n/g) } diff --git a/client/common/configuration/templates/channel.ts b/client/common/configuration/templates/channel.ts index 43d47b4d..95eee3e5 100644 --- a/client/common/configuration/templates/channel.ts +++ b/client/common/configuration/templates/channel.ts @@ -47,6 +47,7 @@ async function renderConfigurationChannel ( bannedJIDs: await peertubeHelpers.translate(LOC_LIVECHAT_CONFIGURATION_CHANNEL_BANNED_JIDS_LABEL), save: await peertubeHelpers.translate(LOC_SAVE), cancel: await peertubeHelpers.translate(LOC_CANCEL), + botNickname: await peertubeHelpers.translate(LOC_LIVECHAT_CONFIGURATION_CHANNEL_BOT_NICKNAME), channelConfiguration } @@ -69,6 +70,14 @@ async function renderConfigurationChannel (
{{botOptions}} +