Remove backward compatibility (registerSettingsScript).

This commit is contained in:
John Livingston 2021-06-02 12:32:00 +02:00
parent a1d5d83cc5
commit 56f1c5895e
2 changed files with 21 additions and 24 deletions

View File

@ -47,8 +47,7 @@ interface RegisterClientSettingsScript {
interface RegisterOptions { interface RegisterOptions {
registerHook: (options: RegisterClientHookOptions) => void registerHook: (options: RegisterClientHookOptions) => void
peertubeHelpers: RegisterClientHelpers peertubeHelpers: RegisterClientHelpers
// registerSettingsScript comes with Peertube 3.2.0. registerSettingsScript: (options: RegisterClientSettingsScript) => void
registerSettingsScript?: (options: RegisterClientSettingsScript) => void
} }
interface Video { interface Video {

View File

@ -3,7 +3,6 @@ const converseSettings = ['chat-server', 'chat-room', 'chat-bosh-uri', 'chat-ws-
const otherSettings: string[] = [] const otherSettings: string[] = []
function register ({ registerSettingsScript }: RegisterOptions): void { function register ({ registerSettingsScript }: RegisterOptions): void {
if (registerSettingsScript) {
registerSettingsScript({ registerSettingsScript({
isSettingHidden: options => { isSettingHidden: options => {
const name = options.setting.name const name = options.setting.name
@ -25,7 +24,6 @@ function register ({ registerSettingsScript }: RegisterOptions): void {
return false return false
} }
}) })
}
} }
export { export {