chattercatcher 0.1.10 → 0.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -8,7 +8,7 @@ import fs13 from "fs/promises";
8
8
  // package.json
9
9
  var package_default = {
10
10
  name: "chattercatcher",
11
- version: "0.1.9",
11
+ version: "0.1.11",
12
12
  description: "\u672C\u5730\u4F18\u5148\u7684\u98DE\u4E66/Lark \u5BB6\u5EAD\u7FA4\u77E5\u8BC6\u5E93\u673A\u5668\u4EBA",
13
13
  type: "module",
14
14
  main: "dist/index.js",
@@ -2104,16 +2104,14 @@ function stripMentions(text, mentions) {
2104
2104
  }
2105
2105
  }
2106
2106
  }
2107
- return result.replace(/@\s*ChatterCatcher/gi, " ").replace(/@/g, " ").replace(/\s+/g, " ").trim();
2107
+ return result.replace(/@/g, " ").replace(/\s+/g, " ").trim();
2108
2108
  }
2109
2109
  function isFeishuMessageAddressedToBot(payload) {
2110
2110
  const message = payload.event?.message;
2111
2111
  if (!message || message.message_type !== "text") {
2112
2112
  return false;
2113
2113
  }
2114
- const mentions = message.mentions ?? [];
2115
- const text = parseTextContent(message.content);
2116
- return mentions.length > 0 || /@?ChatterCatcher/i.test(text);
2114
+ return (message.mentions ?? []).length > 0;
2117
2115
  }
2118
2116
  function getFeishuQuestionDecision(payload, config) {
2119
2117
  const message = payload.event?.message;