forked from GitHub/dbot
Only auto shorten long links
This commit is contained in:
parent
d0ed2eddd1
commit
19a3d9cf87
@ -8,7 +8,7 @@ var autoshorten = function(dbot) {
|
||||
var urlRegex = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig;
|
||||
var urlMatches = data.message.match(urlRegex);
|
||||
|
||||
if(urlMatches !== null) {
|
||||
if(urlMatches !== null && urlMatches[0].length > 45) {
|
||||
var url = urlMatches[0]; // Only doing one, screw you.
|
||||
|
||||
var options = {
|
||||
|
Loading…
Reference in New Issue
Block a user