-
Notifications
You must be signed in to change notification settings - Fork 345
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
feat(llc): add support for polls api #2040
Draft
xsahil03x
wants to merge
10
commits into
master
Choose a base branch
from
feat/message-polls-apis
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
+2,421
−56
Conversation
This file contains 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
…at/message-polls-apis
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2040 +/- ##
==========================================
- Coverage 60.27% 60.10% -0.18%
==========================================
Files 318 322 +4
Lines 18581 18926 +345
==========================================
+ Hits 11200 11375 +175
- Misses 7381 7551 +170 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
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.
This pull request introduces significant changes to the
stream_chat
package, primarily focused on adding support for poll-related functionalities. The most important changes include adding event listeners for poll events, implementing methods for poll operations in theStreamChatClient
class, and creating a newPollsApi
class to handle poll-related API calls.Poll Events and Listeners:
ChannelClientState
class, including_listenPollUpdated
,_listenPollClosed
,_listenPollAnswerCasted
,_listenPollVoteCasted
,_listenPollVoteChanged
,_listenPollAnswerRemoved
, and_listenPollVoteRemoved
. These listeners handle various poll-related events and update the poll messages accordingly. [1] [2]Poll Operations in
StreamChatClient
:StreamChatClient
class to create, retrieve, update, partially update, delete, close polls, and manage poll options and votes. These methods includecreatePoll
,getPoll
,updatePoll
,partialUpdatePoll
,deletePoll
,closePoll
,createPollOption
,getPollOption
,updatePollOption
,deletePollOption
,castPollVote
,addPollAnswer
,removePollVote
,queryPolls
, andqueryPollVotes
.New
PollsApi
Class:PollsApi
class to define the API operations for polls, including methods for creating, retrieving, updating, partially updating, deleting polls, managing poll options, casting and removing votes, and querying polls and poll votes.Event Stream Mapping:
eventStream
getter in theStreamChatClient
class to map poll vote events to specific poll answer events, making it easier to handle these events in the state.Import Statements:
client.dart
andresponses.dart
. [1] [2]These changes enhance the
stream_chat
package by adding comprehensive support for poll functionalities, including event handling, API operations, and state management.