Fix «autocolor» mecanism when no color provided (raised an error)
This commit is contained in:
parent
a25cdb44ef
commit
91ea442ce6
@ -31,6 +31,10 @@ If you don't want the chat server to be active, just uninstall the plugin
|
|||||||
* ConverseJS v10.0.0 (instead of v9.0.0).
|
* ConverseJS v10.0.0 (instead of v9.0.0).
|
||||||
* Prosody server: enabling mod_disco.
|
* Prosody server: enabling mod_disco.
|
||||||
|
|
||||||
|
### Minor changes and fixes
|
||||||
|
|
||||||
|
* Fix «autocolor» mecanism when no color provided (raised an error)
|
||||||
|
|
||||||
## 5.7.1
|
## 5.7.1
|
||||||
|
|
||||||
* Adding an easy way to customize background transparency in OBS and co.
|
* Adding an easy way to customize background transparency in OBS and co.
|
||||||
|
@ -163,6 +163,9 @@ async function initWebchatRouter (options: RegisterServerOptionsV5): Promise<Rou
|
|||||||
link: req.query._ac_link?.toString() ?? '',
|
link: req.query._ac_link?.toString() ?? '',
|
||||||
linkHover: req.query._ac_linkHover?.toString() ?? ''
|
linkHover: req.query._ac_linkHover?.toString() ?? ''
|
||||||
}
|
}
|
||||||
|
if (!Object.values(autocolors).find(c => c !== '')) {
|
||||||
|
peertubeHelpers.logger.debug('All AutoColors are empty.')
|
||||||
|
} else {
|
||||||
const autoColorsTest = areAutoColorsValid(autocolors)
|
const autoColorsTest = areAutoColorsValid(autocolors)
|
||||||
if (autoColorsTest === true) {
|
if (autoColorsTest === true) {
|
||||||
autocolorsStyles = `
|
autocolorsStyles = `
|
||||||
@ -186,6 +189,7 @@ async function initWebchatRouter (options: RegisterServerOptionsV5): Promise<Rou
|
|||||||
} else {
|
} else {
|
||||||
peertubeHelpers.logger.error('Provided AutoColors are invalid.', autoColorsTest)
|
peertubeHelpers.logger.error('Provided AutoColors are invalid.', autoColorsTest)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
peertubeHelpers.logger.debug('No AutoColors.')
|
peertubeHelpers.logger.debug('No AutoColors.')
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user