remove ncid in link (it's facebook tag)

This commit is contained in:
Mickael 2019-11-17 14:02:43 +01:00
parent ce0b876b6a
commit 314948d453
1 changed files with 1 additions and 0 deletions

View File

@ -24,6 +24,7 @@ bot.global.text(/(https?:\/\/[^ ,\)"\n]*)/ig, async (b) => {
var extra = "";
var link = res.request.uri.href;
link = link.replace(/[\?&]fbclid=.+/gi, "");
link = link.replace(/[\?&]ncid=.+/gi, "");
if (/youtube.com/.test(link)) {
if (t = /[?&]v=([^&]+)/.exec(link)) {
link = "https://www.youtube.com/watch?v=" + t[1];