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 +3 -5
- package/dist/cli.js.map +1 -1
- package/dist/index.js +2 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2029,16 +2029,14 @@ function stripMentions(text, mentions) {
|
|
|
2029
2029
|
}
|
|
2030
2030
|
}
|
|
2031
2031
|
}
|
|
2032
|
-
return result.replace(
|
|
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
|
-
|
|
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;
|