Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

When mentioning with @ if the username contains space the first name is recognised as the mentioned user.

Open
#1,810 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
swift
Domain
mobile

Research direction

Reproduce the issue in the Example app with the supplied DetectorType.custom regular expression and trace how the mention selection handles names containing spaces. Done means selecting @Steven Deutsch reports the full mentioned text rather than only @Steven, while preserving existing mention behavior.

Written by the indexing model from the issue text.

Description

bug?

Describe the bug
When mentioning with @ if the username contains space the first name is recognised as the mentioned user.

To Reproduce
Steps/code to reproduce the behavior:

public static var mention = DetectorType.custom(try! NSRegularExpression(pattern: "@[a-zA-Z0-9]{4,}", options: []))

Expected behaviour
It should recognise the mentioned text not only the first name.
print on console
Mention selected: @Steven
It should print
Mention selected: @Steven Deutsch

Screenshots

Simulator Screenshot - iPhone 14 Pro Max - 2023-08-29 at 14 25 12

Environment

  • What version of MessageKit are you using? 4.2.0
  • What version of iOS are you running on? iOS 16
  • What version of Swift are you running on? Swift 5
  • What device(s) are you testing on? Are these simulators? iPhone 14 Pro Max
  • Is the issue you're experiencing reproducible in the example app? it is reproducible in Example app.
Dominant language
Swift
Stars
6.3k
Forks
1.2k
Avg merge
12h 4m
Merged PRs (30d)
9

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.

More from MessageKit/MessageKit

All issues in MessageKit/MessageKit

Similar issues

More Swift issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.