Skip to content

Commit 854c075

Browse files
Add missing polls LLC operations (#5966)
* Add missing arguments to `CreatePoll`. * Add `getPoll` operation. * Add `partialUpdatePoll` operation. * Rework close poll to use partialUpdatePoll internally. * Add `createPollOption` and `updatePollOption`. * Add `deletePollOption`. * Add `deletePollOption`. * Add `QueryPolls`. * Add `QueryPollVotes`. * Deprecate `ChatClient.suggestPollOption. * Bump ChatDatabase version. * Update PollConfig to prevent breaking changes. * Re-organize ChatClient poll operations. * Update CHANGELOG.md. * Fix tests. * Improve test coverage. * Update stream-chat-android-client/src/main/java/io/getstream/chat/android/client/api/models/PollRequests.kt Co-authored-by: Copilot <[email protected]> * Improve test coverage. * Bump DB version. * Fix KDocs. * Simplify ChatClient#removePollVote. * Simplify ChatClient#castPollVote. * Add UpdatePoll. * Add UpdatePoll tests. * Simplify createPollOption and updatePollOption. --------- Co-authored-by: Copilot <[email protected]>
1 parent 3c5150b commit 854c075

File tree

54 files changed

+3643
-466
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+3643
-466
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,19 @@
2121
- Introduce `Channel.userRead` extension function to get the read status of a specific user in the channel. [#5979](https://github.com/GetStream/stream-chat-android/pull/5979)
2222
- Introduce `Channel.readsOf` extension function to get the read statuses representing which users have read the given message in the channel. [#5979](https://github.com/GetStream/stream-chat-android/pull/5979)
2323
- Introduce `ChatClient.markMessageAsDelivered` to mark a message as delivered for the current user. [#5979](https://github.com/GetStream/stream-chat-android/pull/5979)
24+
- Add `ChatClient.getPoll(pollId: String)` for retrieving a poll by its ID. [#5966](https://github.com/GetStream/stream-chat-android/pull/5966)
25+
- Add `ChatClient.partialUpdatePoll(pollId: String, set: Map<String, Any>, unset: List<String>)` for partially updating a poll. [#5966](https://github.com/GetStream/stream-chat-android/pull/5966)
26+
- Add `ChatClient.createPollOption(pollId: String, option: CreatePollOptionRequest)` for creating a poll option. [#5966](https://github.com/GetStream/stream-chat-android/pull/5966)
27+
- Add `ChatClient.updatePollOption(pollId: String, option: UpdatePollOptionRequest)` for updating a poll option. [#5966](https://github.com/GetStream/stream-chat-android/pull/5966)
28+
- Add `ChatClient.deletePollOption(pollId: String, optionId: String)` for deleting a poll option. [#5966](https://github.com/GetStream/stream-chat-android/pull/5966)
29+
- Add `ChatClient.queryPollVotes(pollId: String, filter: FilterObject?, limit: Int?, next: String?, sort: QuerySorter<Vote>?)` for querying poll votes with filtering, sorting, and pagination support. [#5966](https://github.com/GetStream/stream-chat-android/pull/5966)
30+
- Add `ChatClient.queryPolls(filter: FilterObject?, limit: Int?, next: String?, sort: QuerySorter<Poll>?)` for querying polls with filtering, sorting, and pagination support. [#5966](https://github.com/GetStream/stream-chat-android/pull/5966)
31+
- Add `PollConfig` constructor with support for extra custom data for the poll and the poll options. [#5966](https://github.com/GetStream/stream-chat-android/pull/5966)
2432

2533
### ⚠️ Changed
2634
- Deprecate `Channel.hasUnread` property in favor of `Channel.currentUserUnreadCount`. [#5979](https://github.com/GetStream/stream-chat-android/pull/5979)
35+
- Deprecate `PollConfig` constructor without support for custom data. [#5966](https://github.com/GetStream/stream-chat-android/pull/5966)
36+
- Deprecate `ChatClient.suggestPollOption(pollId: String, option: String)` in favour of `ChatClient.createPollOption(pollId: String, option: CreatePollOptionRequest)`. [#5966](https://github.com/GetStream/stream-chat-android/pull/5966)
2737

2838
### ❌ Removed
2939

DEPRECATIONS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ This document lists deprecated constructs in the SDK, with their expected time
44

55
| API / Feature | Deprecated (warning) | Deprecated (error) | Removed | Notes |
66
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------|-----------------------|-----------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
7+
| `PollConfig(String, List<String>, String, VotingVisibility, Boolean, Int, Boolean, Boolean)` constructor | 2025.11.07 ⌛ | | | This constructor has been deprecated. Please use `PollConfig(String, List<PollOption>, String, VotingVisibility, Boolean, Int, Boolean, Boolean, Map<String, Any>)` instead. |
8+
| `ChatClient.suggestPollOption(pollId: String, option: String)` method | 2025.11.07 ⌛ | | | This method has been deprecated. Please use `ChatClient.createPollOption(pollId: String, option: CreatePollOptionRequest)` instead. |
9+
| `ChatClient.removePollVote(messageId: String, pollId: String, vote: Vote)` method | 2025.11.07 ⌛ | | | This method has been deprecated. Please use `ChatClient.removePollVote(messageId: String, pollId: String, voteId: String)` instead. |
10+
| `ChatClient.castPollVote(messageId: String, pollId: String, option: Option)` method | 2025.11.07 ⌛ | | | This method has been deprecated. Please use `ChatClient.castPollVote(messageId: String, pollId: String, optionId: String)` instead. |
711
| `SendReactionListener.onSendReactionRequest(cid: String?, reaction: Reaction, enforceUnique: Boolean, currentUser: User)` method | 2025.09.22 ⌛ | | | This method has been deprecated. Please use `SendReactionListener.onSendReactionRequest(cid: String?, reaction: Reaction, enforceUnique: Boolean, skipPush: Boolean, currentUser: User)` instead. |
812
| `AudioWaveVSeekbar`<br/>*compose* | 2025.09.22 ⌛ | | | |
913
| `StateRegistry.queryThreads()` method | 2025.09.15 ⌛ | | | This method has been deprecated as it is no longer used internally. Please use the `StateRegistry.queryThreads(FilterObject, QuerySorter)` method instead for better flexibility. |

0 commit comments

Comments
 (0)