Add missing polls LLC operations#5966
Merged
VelikovPetar merged 33 commits intodevelopfrom Nov 17, 2025
Merged
Conversation
# Conflicts: # stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/MoshiChatApi.kt # stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api2/mapping/DomainMapping.kt # stream-chat-android-client/src/test/java/io/getstream/chat/android/client/Mother.kt
Contributor
|
DB Entities have been updated. Do we need to upgrade DB Version? |
Contributor
SDK Size Comparison 📏
|
# Conflicts: # stream-chat-android-client/src/main/java/io/getstream/chat/android/client/ChatClient.kt
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR implements missing polls LLC (Low Level Client) operations to provide comprehensive poll and poll option management capabilities. The PR adds several new endpoints while maintaining backward compatibility through deprecation warnings.
Key changes include:
- Addition of poll CRUD operations including get, partial update, and query endpoints
- Implementation of poll option lifecycle management (create, update, delete)
- Enhanced poll creation with support for extra data on both polls and options
- Proper offline storage updates and network/domain model extensions
Reviewed Changes
Copilot reviewed 49 out of 49 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| stream-chat-android-ui-components/.../CreatePollViewModel.kt | Updates poll creation to use PollOption objects instead of plain strings |
| stream-chat-android-ui-common/.../MessageListController.kt | Replaces deprecated suggestPollOption with createPollOption |
| stream-chat-android-previewdata/.../PreviewPollData.kt | Adds missing poll properties for preview data consistency |
| stream-chat-android-offline/.../PollsMapperTest.kt | New comprehensive test suite for poll entity mapping |
| stream-chat-android-offline/.../PollsMapper.kt | New mapper for poll entity conversions with proper domain mapping |
| stream-chat-android-offline/.../Poll.kt | Enhanced poll entity with additional fields for complete data storage |
| stream-chat-android-offline/.../MessageMapper.kt | Removes duplicate poll mapping code in favor of dedicated mapper |
| stream-chat-android-offline/.../ChatDatabase.kt | Database schema version bump to accommodate new poll fields |
| stream-chat-android-core/.../Mother.kt | Updates test data factory to include new poll properties |
| stream-chat-android-core/.../Poll.kt | Enhanced poll models with extra data support and comparable field providers |
| stream-chat-android-client/.../ChatClient.kt | Adds comprehensive poll management API methods with proper deprecation |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
...hat-android-client/src/main/java/io/getstream/chat/android/client/api/models/PollRequests.kt
Outdated
Show resolved
Hide resolved
…roid/client/api/models/PollRequests.kt Co-authored-by: Copilot <[email protected]>
# Conflicts: # CHANGELOG.md
# Conflicts: # CHANGELOG.md
# Conflicts: # CHANGELOG.md
andremion
reviewed
Nov 6, 2025
...-android-client/src/main/java/io/getstream/chat/android/client/api2/mapping/DomainMapping.kt
Outdated
Show resolved
Hide resolved
stream-chat-android-client/src/main/java/io/getstream/chat/android/client/ChatClient.kt
Outdated
Show resolved
Hide resolved
stream-chat-android-client/src/main/java/io/getstream/chat/android/client/ChatClient.kt
Show resolved
Hide resolved
stream-chat-android-client/src/main/java/io/getstream/chat/android/client/ChatClient.kt
Outdated
Show resolved
Hide resolved
# Conflicts: # CHANGELOG.md
# Conflicts: # CHANGELOG.md # stream-chat-android-client/src/main/java/io/getstream/chat/android/client/parser2/MoshiChatParser.kt # stream-chat-android-client/src/test/java/io/getstream/chat/android/client/Mother.kt # stream-chat-android-client/src/test/java/io/getstream/chat/android/client/api2/MoshiChatApiTest.kt # stream-chat-android-client/src/test/java/io/getstream/chat/android/client/api2/mapping/DomainMappingTest.kt
andremion
approved these changes
Nov 17, 2025
...-android-client/src/main/java/io/getstream/chat/android/client/api2/mapping/DomainMapping.kt
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



🎯 Goal
Implements poll and poll options management operations on the LLC.
Added:
ChatClient.getPoll(pollId: String)ChatClient.updatePoll(poll: UpdatePollRequest)ChatClient.partialUpdatePoll(pollId: String, set: Map<String, Any>, unset: List<String>)ChatClient.createPollOption(pollId: String, option: PollOption)ChatClient.updatePollOption(pollId: String, option: PollOption)ChatClient.deletePollOption(pollId: String, optionId: String)ChatClient.queryPollVotes(pollId: String, filter: FilterObject?, limit: Int?, next: String?, sort: QuerySorter<Vote>?)ChatClient.queryPolls(filter: FilterObject?, limit: Int?, next: String?, sort: QuerySorter<Poll>?)ChatClient.castPollVote(messageId: String, pollId: String, optionId: String)ChatClient.removePollVote(messageId: String, pollId: String, voteId: String)PollConfig(used inChatClient.sendPoll) constructor which accepts extra data for the poll and the poll optionsDeprecated:
PollConfigconstructor without extra dataChatClient.suggestPollOptionin favour ofChatClient.createPollOptionChatClient.castPollVote(messageId: String, pollId: String, option: Option)in favor ofChatClient.castPollVote(messageId: String, pollId: String, optionId: String)ChatClient.removePollVote(messageId: String, pollId: String, voteId: String)in favor ofChatClient.removePollVote(messageId: String, pollId: String, vote: Vote)Resolves: https://linear.app/stream/issue/AND-793/align-llc-polls-api
Docs PR: https://github.com/GetStream/docs-content/pull/690
🛠 Implementation details
Implements the missing poll-related operations, alongside the Retrofit APIs, network/domain models, and offline storage updates. Replaces the usage of the deprecated methods with the new ones.
Resolves:
https://linear.app/stream/issue/AND-793/align-llc-polls-api
🎨 UI Changes
NA
🧪 Testing
Standard poll testing:
Ensure everything works fine
For the new endpoints - they are not linked to the UI, so you need to manually call them and verify they return the expected results.