Coabot don't send fbclid info

This commit is contained in:
Mickael (MckMonster) 2019-11-10 16:44:58 +00:00 committed by mose
parent 9d93fa5b99
commit 9cec729dd9

View file

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