Joystream Stats 3 лет назад
Родитель
Сommit
b6bc3030ca
1 измененных файлов с 12 добавлено и 1 удалено
  1. 12 1
      community-contributions/joystreamtelegrambot/src/bot.ts

+ 12 - 1
community-contributions/joystreamtelegrambot/src/bot.ts

@@ -70,7 +70,18 @@ const sendTelegram = (msg: string) => {
 };
 const sendDiscord = (msg: string, channel: any) => {
   if (!channel) return;
-  const stripped: string = stripHtml(msg).result;
+
+  const options = {
+    dumpLinkHrefsNearby: {
+      enabled: false,
+      putOnNewLine: false,
+      wrapHeads: "",
+      wrapTails: "",
+    },
+  };
+
+  const stripped: string = stripHtml(msg, options).result;
+
   if (!stripped.length) return;
   try {
     channel.send(stripped);