Fix user mentions not working when commands are disabled #826
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🔗 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
☑️ Contributor Checklist
docs-content
repo