Plugins: don't show plugin repeatedly for same URL in same message
Fixes #636
This commit is contained in:
parent
03af5d7158
commit
ec221af52e
1 changed files with 1 additions and 1 deletions
|
@ -33,7 +33,7 @@ var urlRegexp = /(?:(?:https?|ftp):\/\/|www\.|ftp\.)\S*[^\s.;,(){}<>]/g;
|
|||
var UrlPlugin = function(name, urlCallback) {
|
||||
return {
|
||||
contentForMessage: function(message) {
|
||||
var urls = message.match(urlRegexp);
|
||||
var urls = _.uniq(message.match(urlRegexp));
|
||||
var content = [];
|
||||
|
||||
for (var i = 0; urls && i < urls.length; i++) {
|
||||
|
|
Loading…
Reference in a new issue