Skip to content
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-2052] Fix crash in ListDatabaseObserver.startObserving() #2177

Merged
merged 4 commits into from
Jul 22, 2022

Conversation

nuno-vieira
Copy link
Member

@nuno-vieira nuno-vieira commented Jul 19, 2022

🔗 Issue Links

CIS-2052

🎯 Goal

Fixes crash in ListDatabaseObserver.startObsvering().

📝 Summary

It removes the force unwrap when converting DTO's to models. When DTO's have been deleted, they can fail to convert to domain models, so in this case, we avoid the force unwrap and discard the DTO's that are deleted.

🧪 Manual Testing Notes

N/A

☑️ Contributor Checklist

  • I have signed the Stream CLA (required)
  • Changelog is updated with client-facing changes
  • New code is covered by unit tests
  • This change follows zero ⚠️ policy (required)
  • Comparison screenshots added for visual changes
  • Affected documentation updated (docusaurus, tutorial, CMS)

It removes the force unwrap when converting dto's to models
@nuno-vieira nuno-vieira added 🐞 Bug An issue or PR related to a bug 🌐 SDK: StreamChat (LLC) Tasks related to the StreamChat LLC SDK labels Jul 19, 2022
@emerge-tools
Copy link

emerge-tools bot commented Jul 19, 2022

📏 Size Analysis

Total install size 9.4 MB | This change: ⬆️ +18.5 kB (+0.197%)

Image of diff

🗂 See size breakdown
Item Install size
StreamChat.framework/StreamChat.LazyCachedMapCollection.init(source,map) ⬆️ 7.4 kB
StreamChat.framework/StreamChat.ListDatabaseObserver.startObserving ⬆️ 6.3 kB
StreamChat.framework/StreamChat._arrayForceCast ⬆️ 1.6 kB

🔎 See the full size analysis (bc05b87) merging into develop (b171abe)

Provide a baseSha and pullRequestNumber with your upload to ensure diffs are correct. Read more in the docs

@nuno-vieira nuno-vieira marked this pull request as ready for review July 22, 2022 09:52
@nuno-vieira nuno-vieira requested a review from a team as a code owner July 22, 2022 09:52
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.

LGTM ✅
If possible, getting early feedback from the affected customer (before the next release), would be great.

@sonarcloud
Copy link

sonarcloud bot commented Jul 22, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

75.0% 75.0% Coverage
0.0% 0.0% Duplication

@nuno-vieira nuno-vieira merged commit aa25375 into develop Jul 22, 2022
@nuno-vieira nuno-vieira deleted the fix/CIS-2052-ListDatabaseObserver-startObserving branch July 22, 2022 17:21
@hugobernalstream hugobernalstream mentioned this pull request Aug 2, 2022
nuno-vieira added a commit that referenced this pull request Aug 26, 2022
…2252)

* Revert "[CIS-2052] Fix crash in ListDatabaseObserver.startObserving() (#2177)"

This reverts commit aa25375.

* Update CHANGELOG.md
polqf pushed a commit that referenced this pull request Sep 1, 2022
…2252)

* Revert "[CIS-2052] Fix crash in ListDatabaseObserver.startObserving() (#2177)"

This reverts commit aa25375.

* Update CHANGELOG.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 Bug An issue or PR related to a bug 🌐 SDK: StreamChat (LLC) Tasks related to the StreamChat LLC SDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants