Introduce "mention()" middleware for catching all mentions in messages
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.9k
- Forks
- 446
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 28
Description
Description
directMention() middleware matches only when a bot user is mentioned as the first person in a message. This is because the middleware was designed to be compatible with Hubot's robot.respond() functionality.
Also, Slapp (the ancestor of Bolt for JS) defines "direct mention" as being mentioned at the start of a message while "mention" means being mentioned anywhere in a message.
With full respect for the original meaning of "direct mention" in Slapp, I propose to add built-in mention() middleware to Bolt for JS. I'll be working on this sometime soon, but if anyone is interested in implementing this, any contribution is welcome!
What type of issue is this? (place an x in one of the [ ])
- bug
- enhancement (feature request)
- question
- documentation related
- testing related
- discussion
Requirements (place an x in each of the [ ])
- I've read and understood the Contributing guidelines and have done my best effort to follow them.
- I've read and agree to the Code of Conduct.
- I've searched for any related issues and avoided creating a duplicate issue.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the existing directMention() middleware and compare its first-position behavior with the linked Slapp definitions of messageIsDirectMention and messageIsMention. Add a built-in mention() middleware that matches bot mentions anywhere in a message, then verify its behavior against the existing middleware coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100