Skip to content

Conversation

@VelikovPetar
Copy link
Contributor

🎯 Goal

Instead of crashing when we try to fetch a User that is not yet inserted into the DB, return an empty User (User(id = userId)). Note: This just covers the case where a User is transitively fetched by related operations (ex. selectMessage, selectChannel), the regular repository.selectUser() is not affected.

🛠 Implementation details

  • remove requireNotNull and instead fallback to empty User

🎨 UI Changes

NA

🧪 Testing

Not really reproducible on the Sample app, however it was reported by a customer who use the Repository independently from the UI SDK.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 7, 2025

SDK Size Comparison 📏

SDK Before After Difference Status
stream-chat-android-client 3.23 MB 3.23 MB 0.00 MB 🟢
stream-chat-android-offline 3.45 MB 3.45 MB 0.00 MB 🟢
stream-chat-android-ui-components 10.54 MB 10.54 MB 0.00 MB 🟢
stream-chat-android-compose 12.76 MB 12.76 MB 0.00 MB 🟢

@VelikovPetar VelikovPetar marked this pull request as ready for review November 7, 2025 14:08
@VelikovPetar VelikovPetar requested a review from a team as a code owner November 7, 2025 14:08
@sonarqubecloud
Copy link

@VelikovPetar VelikovPetar merged commit 95267e7 into develop Nov 11, 2025
13 checks passed
@VelikovPetar VelikovPetar deleted the bug/AND-897_prevent_crash_if_user_is_not_found_in_db branch November 11, 2025 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants