matrix-org / matrix-org/mjolnir

The bot should reject incorrect userIds rather than no-oping.

Open
#64 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
445
Forks
75
Avg merge
2d 44m
Merged PRs (30d)
3

Description

Currently doing a:

!mjolnir ban @Half-Shot@half-shot.uk

will succeed with a green checkmark, because it technically didn't find any users with that user_id.

We shouldn't be too strict because not all bots and bridges follow the user_id schema (looking at you, IRC bridge), but basic checks to ensure it starts with an @ and has a : in the middle would catch simple typos.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the !mjolnir ban command entry point and trace how the supplied userId is parsed and matched. Preserve compatibility with nonstandard bridge IDs while ensuring malformed IDs no longer report a successful no-op; verify the command's result for the example typo.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.