Add polls' room summaries (#1770)

* Update sdk to 1.1.18 & add poll summary

* Fix localisation
This commit is contained in:
Alfonso Grillo
2023-09-21 09:47:14 +02:00
committed by GitHub
parent 9d91cd4fc0
commit 7048a0e4ad
9 changed files with 21 additions and 14 deletions
@@ -633,7 +633,7 @@ class RoomProxy: RoomProxyProtocol {
}
}
func setName(_ name: String?) async -> Result<Void, RoomProxyError> {
func setName(_ name: String) async -> Result<Void, RoomProxyError> {
await Task.dispatch(on: .global()) {
do {
return try .success(self.room.setName(name: name))
@@ -159,7 +159,7 @@ protocol RoomProxyProtocol {
func invite(userID: String) async -> Result<Void, RoomProxyError>
func setName(_ name: String?) async -> Result<Void, RoomProxyError>
func setName(_ name: String) async -> Result<Void, RoomProxyError>
func setTopic(_ topic: String) async -> Result<Void, RoomProxyError>
@@ -68,9 +68,8 @@ struct RoomEventStringBuilder {
member: sender.id,
memberIsYou: isOutgoing)
.map(AttributedString.init)
case .poll:
// The Rust SDK doesn't support poll events as room summaries yet
return nil
case .poll(let question, _, _, _, _, _):
return prefix(L10n.commonPollSummary(question), with: senderDisplayName)
}
}