Fix case-sensitive feed URLs

This commit is contained in:
hgw 2023-10-02 02:11:27 +00:00
parent 9ec788b71a
commit 96351f888d

5
bot.js
View File

@ -67,7 +67,10 @@ async function opt(chan, user, setting, setting2, value, value2) {
async function feed(chan, nick, provfeed, n) {
var userconf = fs.readFileSync('./config/usersettings.json')
var uconfig = JSON.parse(userconf)
var provfeed = provfeed.toLowerCase()
if (isValidUrl(provfeed) === false) {
consoleLog('[bot.feed] Provided feed is not a URL, transforming to lowercase')
var provfeed = provfeed.toLowerCase()
}
var predefinedFeeds = ['twitter', 'github']
var predefString = provfeed.split("/")
if (provfeed === undefined) {