Skip to content
This repository was archived by the owner on Jun 8, 2023. It is now read-only.

Commit e90774d

Browse files
author
Tom Bell
committed
Merge pull request #978 from driverdan/master
Update bitly script to support amzn.to and URLs with dashes
2 parents aa6a058 + 1c8f714 commit e90774d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/scripts/bitly.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ module.exports = (robot) ->
3030
msg.send if response.status_code is 200 then response.data.url else response.status_txt
3131

3232
#TODO: can we make this list more expansive/dynamically generated?
33-
robot.hear /(https?:\/\/(bit\.ly|yhoo\.it|j\.mp|pep\.si)\/[0-9a-z]+)/ig, (msg) ->
33+
robot.hear /(https?:\/\/(bit\.ly|yhoo\.it|j\.mp|pep\.si|amzn\.to)\/[0-9a-z\-]+)/ig, (msg) ->
3434
msg
3535
.http("http://api.bitly.com/v3/expand")
3636
.query

0 commit comments

Comments
 (0)