8000 Fix showing unmute user message action just after muting the user by laevandus · Pull Request #847 · GetStream/stream-chat-swiftui · GitHub
[go: up one dir, main page]

Skip to content

Fix showing unmute user message action just after muting the user #847

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 8000 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

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

laevandus
Copy link
Contributor
@laevandus laevandus commented Jun 2, 2025

🔗 Issue Links

Resolves: IOS-476

🎯 Goal

Unmute user did not appear because of comparing user objects, not ids

📝 Summary

  • Compare muted users by id

🛠 Implementation

ChatUser equality changed awhile ago where it just comparing ids, it compares other properties as well. This broke this check.

🎨 Showcase

Before After
img img

🧪 Manual Testing Notes

  1. Long press on the participant's message
  2. Mute user
  3. Long press on the participant's message

☑️ 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

@laevandus laevandus requested a review from a team as a code owner June 2, 2025 12:10
@laevandus laevandus force-pushed the fix/unmute-user-message-action branch from 2c5cab5 to 8f98355 Compare June 2, 2025 12:12
@Stream-SDK-Bot
Copy link
Collaborator
Stream-SDK-Bot commented Jun 2, 2025

SDK Size

title develop branch diff status
StreamChatSwiftUI 8.27 MB 8.23 MB -32 KB 🚀

Copy link
sonarqubecloud bot commented Jun 2, 2025
10000

@@ -469,6 +471,7 @@
<attribute name="lastActivityAt" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
<attribute name="name" optional="YES" attributeType="String"/>
<attribute name="teams" attributeType="Transformable" valueTransformerName="NSSecureUnarchiveFromDataTransformer"/>
<attribute name="teamsRole" optional="YES" attributeType="Transformable" valueTransformerName="NSSecureUnarchiveFromDataTransformer"/>
Copy link
Member

Choose a reason for hiding this comment

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

Why has this file changed? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because we have a copy of the CoreData model (historical reasons as what I understand) and it was updated to set teamsRole when creating UserDTO. This unit-test is special because current user controller is accessed from the message actions and it requires data in the database.

Copy link
Member
@nuno-vieira nuno-vieira left a comment

Choose a reason for hiding this comment

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

The implementation looks good, but it looks like we included some unrelated code here?

@laevandus laevandus force-pushed the fix/unmute-user-message-action branch from 8f98355 to bc7b0cb Compare June 5, 2025 06:19
@laevandus laevandus enabled auto-merge (squash) June 5, 2025 06:19
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
0