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/index.js CHANGED
@@ -2029,16 +2029,14 @@ function stripMentions(text, mentions) {
2029
2029
  }
2030
2030
  }
2031
2031
  }
2032
- return result.replace(/@\s*ChatterCatcher/gi, " ").replace(/@/g, " ").replace(/\s+/g, " ").trim();
2032
+ return result.replace(/@/g, " ").replace(/\s+/g, " ").trim();
2033
2033
  }
2034
2034
  function isFeishuMessageAddressedToBot(payload) {
2035
2035
  const message = payload.event?.message;
2036
2036
  if (!message || message.message_type !== "text") {
2037
2037
  return false;
2038
2038
  }
2039
- const mentions = message.mentions ?? [];
2040
- const text = parseTextContent(message.content);
2041
- return mentions.length > 0 || /@?ChatterCatcher/i.test(text);
2039
+ return (message.mentions ?? []).length > 0;
2042
2040
  }
2043
2041
  function getFeishuQuestionDecision(payload, config) {
2044
2042
  const message = payload.event?.message;