Remove backward compatibility (onSettingsChange callback is async).
This commit is contained in:
parent
88d9ad1f94
commit
52a3edb9da
2
server/@types/peertube.d.ts
vendored
2
server/@types/peertube.d.ts
vendored
@ -17,7 +17,7 @@ interface PluginSettingsManager {
|
||||
getSetting: (name: string) => Promise<string | boolean>
|
||||
getSettings: (names: string[]) => Promise<{ [settingName: string]: string | boolean }>
|
||||
setSetting: (name: string, value: string) => Promise<any>
|
||||
onSettingsChange: (cb: (names: string[]) => void) => void
|
||||
onSettingsChange: (cb: (names: string[]) => Promise<any>) => void
|
||||
}
|
||||
|
||||
interface PluginStorageManager {
|
||||
|
@ -202,8 +202,6 @@ Before asking for help, please use this diagnostic tool:
|
||||
|
||||
// settings changes management
|
||||
|
||||
// FIXME: Peertube <= 3.1.0 wrongly consider that the callback should not be async
|
||||
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
||||
settingsManager.onSettingsChange(async (settings: any) => {
|
||||
if ('chat-use-prosody' in settings) {
|
||||
if (settings['chat-use-prosody'] === true) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user