Updated twitch chat component to support user colors and to auto open if the chat has already been downloaded

This commit is contained in:
Isaac Abadi
2020-12-08 22:57:09 -05:00
parent 8c916d8fe4
commit f425b9842f
4 changed files with 9 additions and 5 deletions

View File

@@ -2037,6 +2037,8 @@ app.post('/api/getFile', optionalJwt, function (req, res) {
if (!file && type) file = db.get(`files.${type}`).find({uid: uid}).value();
}
// check if chat exists for twitch videos
if (file['url'].includes('twitch.tv')) file['chat_exists'] = fs.existsSync(file['path'].substring(0, file['path'].length - 4) + '.twitch_chat.json');
if (file) {
res.send({