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
[CIS-1580] Fix "Only visible to you" shown when deleted messages visible for all users #1847
[CIS-1580] Fix "Only visible to you" shown when deleted messages visible for all users #1847
Conversation
…idden-when-alwaysVisible
…idden-when-alwaysVisible
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM ✅
Codecov Report
@@ Coverage Diff @@
## develop #1847 +/- ##
===========================================
+ Coverage 85.45% 85.60% +0.15%
===========================================
Files 245 245
Lines 11911 11911
===========================================
+ Hits 10179 10197 +18
+ Misses 1732 1714 -18
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
…ble for all users (#1847) * Fix "Only visible to you" shown when deleted messages visible for all users * Add snapshot tests to make sure the fix is applied * Update CHANGELOG.md * Fix compilation in Tests * Fix automated review * Remove stress test plan from LLC Tests
🔗 Issue Link
CIS-1580
🎯 Goal
Fix the "Only visible to you" label being displayed when the
ChatClientConfig
is set to.alwaysVisible
.🛠 Implementation
Applied Solution:
The current implementation is done in the
ChatMessageListVC
. When the layout options are provided, we override them and remove the.onlyVisibleToYou
label in case the config is not the.onlyVisibleToCurrentUser
.Alternative Solution:
It would make more sense to implement this directly in the
ChatMessageLayoutOptionsResolver
, but this would add a bit of complexity because we would need to inject theChatClientConfig
in theChatMessageLayoutOptionsResolver
. We can't inject it in the constructor, otherwise, we would break the API, and so it would be weird to have an optional chat client config in the resolver, causing it to be error-prone since a customer could easily forget to add the config as a property. For these reasons, the first implementation was the most simple one.🧪 Testing
.alwaysVisible
for deleted messages.☑️ Contributor Checklist