Skip to content

feat: add enhanced mentions#1743

Open
MartinCupela wants to merge 7 commits into
masterfrom
feat/enhanced-mentions
Open

feat: add enhanced mentions#1743
MartinCupela wants to merge 7 commits into
masterfrom
feat/enhanced-mentions

Conversation

@MartinCupela
Copy link
Copy Markdown
Contributor

@MartinCupela MartinCupela commented May 13, 2026

Goal

Provide support for enhanced mentions:

  • @here
  • @channel
  • @user
  • @userRole
  • @userGroup

Summary

It introduces full typed User Group client support, including CRUD/member-management methods and a dedicated UserGroupPaginator, then extends the composer mention pipeline so @ suggestions can return a mixed typed set of users, built-in mentions, roles, and user groups. On selection and send/draft composition, those tracked mention entities are mapped into the correct message fields: mentioned_users, mentioned_channel, mentioned_here, mentioned_roles, and mentioned_group_ids.

Refactors mention normalization into a shared mentionUtils helper, updates search behavior to use the user-group search endpoint only for mention autocomplete, and adds focused regression coverage for the new API surface, paginator behavior, mixed mention suggestions, and send/draft payload generation.

Highlights

  • Add typed StreamChat user-group API methods:
    • queryUserGroups
    • createUserGroup
    • getUserGroup
    • searchUserGroups
    • updateUserGroup
    • deleteUserGroup
    • addUserGroupMembers
    • removeUserGroupMembers
  • Add UserGroupPaginator for cursor-based user-group listing
  • Extend mention suggestions to support:
    • direct users
    • @channel
    • @here
    • roles
    • user groups
  • Track mentions through a unified typed mention-entity model
  • Map tracked enhanced mentions into send and draft payload fields
  • Restrict user-group endpoint usage to autocomplete/search flow only

Todo:

Waiting for back-end support:

  • support for mentioned groups enrichment from server in message response - so that group name and description can be displayed
  • possibility to search for roles so that they can be suggested for mentions

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 13, 2026

Size Change: +13.8 kB (+3.6%)

Total Size: 399 kB

📦 View Changed
Filename Size Change
dist/cjs/index.browser.js 133 kB +4.61 kB (+3.6%)
dist/cjs/index.node.js 134 kB +4.62 kB (+3.57%)
dist/esm/index.mjs 132 kB +4.61 kB (+3.62%)

compressed-size-action

@MartinCupela MartinCupela changed the title Feat/enhanced mentions feat: add enhanced mentions May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant