Skip to content

Conversation

@MartinCupela
Copy link
Contributor

@MartinCupela MartinCupela commented Oct 14, 2025

Goal

Allow integrators to convert UserResponse objects in their custom MentionsSearchSource.query() implementation into UserSuggestion objects:

class CustomMentionsSearchSource extends MentionsSearchSource {
  constructor(channel: ChannelType) {
    super(channel);
  }

  query = async (searchQuery: string) => {
    const response = await this.channel.query({ watchers: { limit: 100 } });
    const items = (response.watchers ?? []).map(this.toUserSuggestion);
    return {
      items,
    };
  };
}

Closes REACT-610
Closes REACT-606

@github-actions
Copy link
Contributor

Size Change: +26 B (+0.01%)

Total Size: 353 kB

Filename Size Change
dist/cjs/index.browser.js 118 kB +9 B (+0.01%)
dist/cjs/index.node.js 119 kB +8 B (+0.01%)
dist/esm/index.mjs 117 kB +9 B (+0.01%)

compressed-size-action

@MartinCupela MartinCupela merged commit e5e0dbf into master Oct 14, 2025
8 checks passed
@MartinCupela MartinCupela deleted the feat/add-MentionsSearchSource-toUserSuggestion-method branch October 14, 2025 13:33
github-actions bot pushed a commit that referenced this pull request Oct 15, 2025
## [9.23.0](v9.22.1...v9.23.0) (2025-10-15)

### Features

* add an api to prune messages from the end ([#1635](#1635)) ([137dca6](137dca6))
* add MentionsSearchSource.toUserSuggestion method ([#1637](#1637)) ([e5e0dbf](e5e0dbf))
* add offline support for delete message for me feature ([#1633](#1633)) ([0ded575](0ded575))

### Refactors

* make channel and client protected in CommandSearchSource and MentionsSearchSource ([#1636](#1636)) ([afe749d](afe749d))
@stream-ci-bot
Copy link

🎉 This PR is included in version 9.23.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.

5 participants