processPoll

fun VoteChangedEvent.processPoll(currentUserId: String?, getOldPoll: (String) -> Poll?): Poll

Processes the VoteChangedEvent and updates the poll with the new vote.

Parameters

currentUserId

The current user ID.

getOldPoll

A function to get the old poll by its ID.


fun VoteCastedEvent.processPoll(currentUserId: String?, getOldPoll: (String) -> Poll?): Poll

Processes the VoteCastedEvent and updates the poll with the new vote.

Parameters

currentUserId

The current user ID.

getOldPoll

A function to get the old poll by its ID.


fun VoteRemovedEvent.processPoll(getOldPoll: (String) -> Poll?): Poll

Processes the VoteRemovedEvent and updates the poll by removing the vote.

Parameters

getOldPoll

A function to get the old poll by its ID.


fun AnswerCastedEvent.processPoll(getOldPoll: (String) -> Poll?): Poll

Processes the AnswerCastedEvent and updates the poll with the new answer.

Parameters

getOldPoll

A function to get the old poll by its ID.


fun PollClosedEvent.processPoll(getOldPoll: (String) -> Poll?): Poll

Processes the PollClosedEvent and updates the poll by marking it as closed.


fun PollUpdatedEvent.processPoll(getOldPoll: (String) -> Poll?): Poll

Processes the PollUpdatedEvent and updates the poll with the new data.

Parameters

getOldPoll

A function to get the old poll by its ID.