wayfind 2.0.12 → 2.0.13
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/bin/slack-bot.js +3 -0
- package/package.json +1 -1
package/bin/slack-bot.js
CHANGED
|
@@ -1276,6 +1276,9 @@ async function start(config) {
|
|
|
1276
1276
|
if (event.user === botUserId || event.bot_id) return;
|
|
1277
1277
|
// Ignore messages that mention the bot (handled by app_mention)
|
|
1278
1278
|
if (event.text && event.text.includes(`<@${botUserId}>`)) return;
|
|
1279
|
+
// Ignore messages that @mention other users — the message is directed at a person, not the bot.
|
|
1280
|
+
// Slack encodes mentions as <@U...>. If any mention is present and none is the bot, skip.
|
|
1281
|
+
if (event.text && /<@U[A-Z0-9]+>/.test(event.text)) return;
|
|
1279
1282
|
// Ignore message subtypes (edits, joins, etc.)
|
|
1280
1283
|
if (event.subtype) return;
|
|
1281
1284
|
|
package/package.json
CHANGED