SendPollVoteUseCase
class SendPollVoteUseCase(messageSender: MessageSender, pollMessageRepository: PollMessageRepository, syncManager: SyncManager, currentClientIdProvider: CurrentClientIdProvider, selfUserId: UserId, dispatcher: KaliumDispatcher = KaliumDispatcherImpl)
Replaces the self user's vote in a native poll.
The vote is stored before it is sent, so results update immediately. If sending fails, the previous vote is restored and Result.Failure is returned.
Constructors
Link copied to clipboard
internal constructor(messageSender: MessageSender, pollMessageRepository: PollMessageRepository, syncManager: SyncManager, currentClientIdProvider: CurrentClientIdProvider, selfUserId: UserId, dispatcher: KaliumDispatcher = KaliumDispatcherImpl)
Functions
Link copied to clipboard
suspend operator fun invoke(conversationId: ConversationId, pollMessageId: String, selectedOptionIds: List<String>): SendPollVoteUseCase.Result