avoid url_metadata to react to chat internal links
This commit is contained in:
parent
7d01477469
commit
156282f571
1 changed files with 10 additions and 8 deletions
|
@ -3,6 +3,7 @@ const bot = require('bbot');
|
|||
const request = require('request');
|
||||
|
||||
bot.global.text(/(https?:\/\/.*)[, $]?/i, (b) => {
|
||||
if (!b.match[1].match(/coa\.crapaud-fou\.org/)) {
|
||||
request(b.match[1], (err, res, body) => {
|
||||
if (!err) {
|
||||
var re = /<title>([^<]*)<\/title>/gi;
|
||||
|
@ -12,6 +13,7 @@ bot.global.text(/(https?:\/\/.*)[, $]?/i, (b) => {
|
|||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}, {
|
||||
id: 'get-url-metadata'
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue