Allow polls to be edited (#1869)

Polls can be edited if they do not have any votes

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
This commit is contained in:
jonnyandrew 2023-11-24 16:47:58 +00:00 committed by GitHub
parent 4e52244b86
commit 8fcec4a006
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
50 changed files with 827 additions and 173 deletions

View file

@ -176,6 +176,23 @@ interface MatrixRoom : Closeable {
pollKind: PollKind,
): Result<Unit>
/**
* Edit a poll in the room.
*
* @param pollStartId The event ID of the poll start event.
* @param question The question to ask.
* @param answers The list of answers.
* @param maxSelections The maximum number of answers that can be selected.
* @param pollKind The kind of poll to create.
*/
suspend fun editPoll(
pollStartId: EventId,
question: String,
answers: List<String>,
maxSelections: Int,
pollKind: PollKind,
): Result<Unit>
/**
* Send a response to a poll.
*