Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Fix user mentions not working when commands are disabled #826

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

nuno-vieira
Copy link
Member

@nuno-vieira nuno-vieira commented May 8, 2025

🔗 Issue Links

https://linear.app/stream/issue/IOS-336/mentions-not-working-if-commands-disabled

🎯 Goal

Fix user mentions not working when commands are disabled

📝 Summary

I've tried multiple things, but this solution was the simplest one without breaking changes. But please let me know if there is a better one. The solution was tricky because in the SwiftUI SDK we are considering user mentions as a command, which is actually not correct. Overall, the ID's approach is a bit fragile; we should improve this in the next major version.

Another problem I've noticed is that we don't really respect the commands from the Dashboard in relation to Mute and Unmute. The expected behaviour is that the Mute and Unmute commands should only be available if they come from the Dashboard. But at the moment, we use channel.config.mutesEnabled to insert these commands, so they will always be present in the composer, independent of the commands dashboard configuration. I did not change this because I'm not sure if this might break some customers.

🧪 Manual Testing Notes

  1. Go to SwiftUI's Demo App Dashboard
  2. Go to Channel Types > Messaging
  3. Disable commands
  4. Open the Demo App
  5. Open a Channel
  6. Write "/" in the composer
  7. It should not show commands
  8. Write "@", it should show user mentions

☑️ Contributor Checklist

  • I have signed the Stream CLA (required)
  • This change should be manually QAed
  • Changelog is updated with client-facing changes
  • Changelog is updated with new localization keys
  • New code is covered by unit tests
  • Documentation has been updated in the docs-content repo

@nuno-vieira nuno-vieira requested a review from a team as a code owner May 8, 2025 09:04
@Stream-SDK-Bot
Copy link
Collaborator

Stream-SDK-Bot commented May 8, 2025

SDK Size

title develop branch diff status
StreamChatSwiftUI 8.18 MB 8.18 MB 0 KB 🟢

Copy link
Contributor

@martinmitrevski martinmitrevski left a comment

Choose a reason for hiding this comment

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

This one makes most sense 👍

@nuno-vieira nuno-vieira merged commit 1c2eba4 into develop May 8, 2025
4 of 5 checks passed
@nuno-vieira nuno-vieira deleted the fix/mentioned-users-not-shown-when-commands-disabled branch May 8, 2025 22:48
Copy link

sonarqubecloud bot commented May 8, 2025

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
Morty Proxy This is a proxified and sanitized view of the page, visit original site.