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

Do not store empty dictionary when updating PollDTO.custom and PollOptionDTO.custom #3551

Merged
merged 3 commits into from
Jan 4, 2025

Conversation

laevandus
Copy link
Contributor

@laevandus laevandus commented Jan 3, 2025

🎯 Goal

Do not store empty dictionary when updating PollDTO.custom and PollOptionDTO.custom because it leads to errors in decoding later

📝 Summary

  • Do not set empty dictionary to custom properties
  • Fixes errors like below
  • This started to happen when I recently added JSON decoding error logs for PollDTO and PollOptionDTO (errors were ignored before)

[NSManagedObjectContext 0x600003520370] [PollOptionDTO.swift:67] [asModel()] > Failed to decode extra data for poll option with id: <9265a0ab-49a7-4d80-9c12-1cc906e71b65>, using default value instead. Error: valueNotFound(Swift.Dictionary<Swift.String, Any>, Swift.DecodingError.Context(codingPath: [], debugDescription: "Cannot get value of type Dictionary<String, Any> -- found null value instead", underlyingError: nil))

🛠 Implementation

🎨 Showcase

🧪 Manual Testing Notes

N/A

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

…tionDTO.custom because it leads to errors in decoding later
@laevandus laevandus added 🐞 Bug An issue or PR related to a bug 🌐 SDK: StreamChat (LLC) Tasks related to the StreamChat LLC SDK labels Jan 3, 2025
@laevandus laevandus requested a review from a team as a code owner January 3, 2025 13:46
@Stream-SDK-Bot
Copy link
Collaborator

Stream-SDK-Bot commented Jan 3, 2025

SDK Size

title develop branch diff status
StreamChat 6.98 MB 6.98 MB 0 KB 🟢
StreamChatUI 4.77 MB 4.77 MB 0 KB 🟢

Copy link

github-actions bot commented Jan 3, 2025

1 Message
📖 There seems to be app changes but CHANGELOG wasn't modified.
Please include an entry if the PR includes user-facing changes.
You can find it at CHANGELOG.md.

Generated by 🚫 Danger

@Stream-SDK-Bot
Copy link
Collaborator

SDK Performance

target metric benchmark branch performance status
MessageList Hitches total duration 10 ms 5.01 ms 49.9% 🔼 🟢
Duration 2.6 s 2.54 s 2.31% 🔼 🟢
Hitch time ratio 4 ms per s 1.97 ms per s 50.75% 🔼 🟢
Frame rate 75 fps 78.01 fps 4.01% 🔼 🟢
Number of hitches 1 0.6 40.0% 🔼 🟢

@laevandus laevandus enabled auto-merge (squash) January 3, 2025 14:09
@Stream-SDK-Bot
Copy link
Collaborator

SDK Size

title develop branch diff status
StreamChat 6.98 MB 6.98 MB 0 KB 🟢
StreamChatUI 4.77 MB 4.77 MB 0 KB 🟢

@laevandus laevandus merged commit 9017687 into develop Jan 4, 2025
14 checks passed
@laevandus laevandus deleted the fix/poll-custom-decoding-error branch January 4, 2025 09:17
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.

4 participants