Merge branch 'fbclid_in_coabot_link' into 'master'
Coabot don't send fbclid info See merge request crapaud-fou/coabot!1
This commit is contained in:
commit
f1803f5cca
1 changed files with 1 additions and 0 deletions
|
@ -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];
|
||||||
|
|
Loading…
Reference in a new issue