Skip to content

feat: add enhanced mentions#1743

Merged
MartinCupela merged 18 commits into
masterfrom
feat/enhanced-mentions
Jun 4, 2026
Merged

feat: add enhanced mentions#1743
MartinCupela merged 18 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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 13, 2026

Size Change: +14.2 kB (+3.63%)

Total Size: 407 kB

📦 View Changed
Filename Size Change
dist/cjs/index.browser.js 135 kB +4.74 kB (+3.63%)
dist/cjs/index.node.js 137 kB +4.76 kB (+3.6%)
dist/esm/index.mjs 135 kB +4.75 kB (+3.66%)

compressed-size-action

@MartinCupela MartinCupela changed the title Feat/enhanced mentions feat: add enhanced mentions May 13, 2026
@MartinCupela MartinCupela merged commit 4892d10 into master Jun 4, 2026
4 of 5 checks passed
@MartinCupela MartinCupela deleted the feat/enhanced-mentions branch June 4, 2026 12:33
github-actions Bot pushed a commit that referenced this pull request Jun 4, 2026
## [9.45.0](v9.44.2...v9.45.0) (2026-06-04)

### Features

* [CHA-3267] before_message_send_hook_attempt_timeout_ms ([#1755](#1755)) ([da02271](da02271))
* add enhanced mentions ([#1743](#1743)) ([4892d10](4892d10))
* **MessageComposer:** control command sendability ([#1746](#1746)) ([79d3af8](79d3af8))

### Chores

* **deps:** bump fast-uri from 3.0.6 to 3.1.2 ([#1753](#1753)) ([d4e74de](d4e74de))
* **deps:** bump handlebars from 4.7.7 to 4.7.9 ([#1757](#1757)) ([9dc1fb6](9dc1fb6))
* **deps:** bump lodash from 4.17.21 to 4.18.1 ([#1751](#1751)) ([05495fe](05495fe))
* **deps:** bump lodash-es from 4.17.21 to 4.18.1 ([#1756](#1756)) ([fa95e18](fa95e18))
@stream-ci-bot
Copy link
Copy Markdown

🎉 This PR is included in version 9.45.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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