Vote on a poll and end a poll (#1597)

* Fix project file

* Add vote and end poll actions

* Handle redaction

* Fix local echo behavior

* Cleanup

* Fix UI tests

* Add localisation

* Cleanup

* Fix end poll action style
This commit is contained in:
Alfonso Grillo
2023-08-31 12:04:25 +02:00
committed by GitHub
parent d43b578dce
commit f0fad25d09
18 changed files with 151 additions and 32 deletions
@@ -43,6 +43,8 @@ enum RoomProxyError: Error, Equatable {
case failedUploadingAvatar
case failedCheckingPermission
case failedCreatingPoll
case failedSendingPollResponse
case failedEndingPoll
}
// sourcery: AutoMockable
@@ -168,6 +170,10 @@ protocol RoomProxyProtocol {
func canUserRedact(userID: String) async -> Result<Bool, RoomProxyError>
func createPoll(question: String, answers: [String], pollKind: Poll.Kind) async -> Result<Void, RoomProxyError>
func sendPollResponse(pollStartID: String, answers: [String]) async -> Result<Void, RoomProxyError>
func endPoll(pollStartID: String) async -> Result<Void, RoomProxyError>
}
extension RoomProxyProtocol {