Skip to content

fix(conversations): parse first name from complex display names#18682

Open
Antreesy wants to merge 1 commit into
mainfrom
fix/noid/first-name-parsing
Open

fix(conversations): parse first name from complex display names#18682
Antreesy wants to merge 1 commit into
mainfrom
fix/noid/first-name-parsing

Conversation

@Antreesy

Copy link
Copy Markdown
Contributor

☑️ Resolves

  • Adds better handling of:
    • inverted "Lastname, Firstname";
    • comma-separated suffixes and credentials;
    • parenthesized annotations;
    • salutations and leading initials.

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

🖌️ UI Checklist

🖼️ Screenshots / Screencasts

🏚️ Before 🏡 After
2026-07-16_11h54_16 image

🏁 Checklist

  • 🌏 Tested with different browsers / clients:
    • Chromium (Chrome / Edge / Opera / Brave)
    • Firefox
    • Safari
    • Talk Desktop
    • Integrations with Files sidebar and other apps
    • Not risky to browser differences / client
  • 🖌️ Design was reviewed, approved or inspired by the design team
  • ⛑️ Tests are included or not possible
  • 📗 User documentation in https://github.com/nextcloud/documentation/tree/master/user_manual/talk has been updated or is not required

Adds better handling of:
- inverted "Lastname, Firstname";
- comma-separated suffixes and credentials;
- parenthesized annotations;
- salutations and leading initials.

Assisted-by: ClaudeCode:claude-fable-5
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
@Antreesy Antreesy added this to the ⛅ Next Major (35) milestone Jul 16, 2026
@Antreesy
Antreesy requested review from DorraJaouad and ShGKme July 16, 2026 10:14
@Antreesy Antreesy self-assigned this Jul 16, 2026
@nextcloud-command nextcloud-command added the AI assisted This PR contains AI-assisted commits label Jul 16, 2026
@nickvergessen

Copy link
Copy Markdown
Member

/backport to stable34

@nickvergessen

Copy link
Copy Markdown
Member

/backport to stable33

*/
const SUFFIX_PATTERN = new RegExp('^(?:'
+ 'i{1,3}|iv|v|senior|junior|jr|sr' // generational
+ '|phd|apr|rph|pe|md|ma|dmd|cme|bsn|mba' // academic / professional

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

msc, bsc, ba, bs

* (e.g. "Martin Luther King, Jr." or "Mary Williams, RN, BSN").
* Based on https://github.com/joshfraser/JavaScript-Name-Parser
*/
const SUFFIX_PATTERN = new RegExp('^(?:'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe also ceo|cto|cfo|coo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants