forked from GitHub/dbot
change shorten length to 65
This commit is contained in:
parent
c76428b1f2
commit
ea893be393
@ -8,7 +8,7 @@ var autoshorten = function(dbot) {
|
|||||||
var urlRegex = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig;
|
var urlRegex = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig;
|
||||||
var urlMatches = data.message.match(urlRegex);
|
var urlMatches = data.message.match(urlRegex);
|
||||||
|
|
||||||
if(urlMatches !== null && urlMatches[0].length > 45) {
|
if(urlMatches !== null && urlMatches[0].length > 65) {
|
||||||
var url = urlMatches[0]; // Only doing one, screw you.
|
var url = urlMatches[0]; // Only doing one, screw you.
|
||||||
|
|
||||||
// TODO: Make this use a decent URL shortener. Mine is shit.
|
// TODO: Make this use a decent URL shortener. Mine is shit.
|
||||||
|
Loading…
Reference in New Issue
Block a user