matrix-org / matrix-org/matrix-hookshot

Command prefixes can clash

Open
#421 3 comments 1 reaction 0 assignees View on GitHub
S-Minor T-Defect
Dominant language
TypeScript
Stars
450
Forks
95
Avg merge
1d 2h
Merged PRs (30d)
23

Description

**Describe the bug**
When there are multiple connections in the same room, it is possible for them to share the same command prefix (`!gl`, `!gh`, etc). If a command with a shared prefix is run, it will only be processed against one of the connections. This prevents being able to run commands for some of the connections that share a command prefix.

**To Reproduce**
Steps to reproduce the behavior:
1. Connect two GitLab projects to a room, and do not customize the command prefix from its default of `!gl`
2. Try to run `!gl` commands in that room
3. Notice that only one of the projects accepts commands

**Expected behavior**
It should be forbidden for multiple connections to share the same command prefix. If adding a new connection with a default prefix clashes with one already in use within a room, either the prefix should be modified to be unique, or the action of adding a connection should require the user to set a custom, unique prefix for it.

**Screenshots**
N/A

**Desktop (please complete the following information):**
N/A

**Smartphone (please complete the following information):**
N/A

**Additional context**
N/A

Contributor guide

Open the contributing guide

Research direction

Trace the connection-creation flow and the room command-prefix dispatch described in the report. Reproduce the collision with two GitLab connections, then ensure adding a connection prevents or resolves duplicate prefixes and verify that commands reach the intended connection.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.