Remove backward compatibility (onSettingsChange callback is async).

This commit is contained in:
John Livingston 2021-06-02 16:07:52 +02:00
parent 88d9ad1f94
commit 52a3edb9da
2 changed files with 1 additions and 3 deletions

View File

@ -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 {

View File

@ -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) {