Bump the RustSDK to v1.0.67 (#3512)

* Bump the RustSDK to v1.0.67

* PR comments

---------

Co-authored-by: Doug <douglase@element.io>
This commit is contained in:
Stefan Ceriu
2024-11-13 20:03:30 +02:00
committed by GitHub
parent 03cb50e6e3
commit 79473ef2e9
27 changed files with 499 additions and 359 deletions
@@ -135,6 +135,8 @@ class EventTimelineItemProxy {
lazy var shieldState = item.lazyProvider.getShields(strict: false)
lazy var sendHandle = item.lazyProvider.getSendHandle()
lazy var readReceipts = item.readReceipts
}
@@ -179,6 +181,40 @@ struct TimelineItemDebugInfo: Identifiable, CustomStringConvertible {
}
}
struct SendHandleProxy: Hashable {
enum Error: Swift.Error {
case sdkError(Swift.Error)
}
let itemID: TimelineItemIdentifier
let underlyingHandle: SendHandle
func resend() async -> Result<Void, Error> {
do {
try await underlyingHandle.tryResend()
return .success(())
} catch {
return .failure(.sdkError(error))
}
}
// MARK: - Hashable
static func == (lhs: SendHandleProxy, rhs: SendHandleProxy) -> Bool {
lhs.itemID == rhs.itemID
}
func hash(into hasher: inout Hasher) {
hasher.combine(itemID)
}
static var mock: SendHandleProxy {
.init(itemID: .event(uniqueID: .init(id: UUID().uuidString),
eventOrTransactionID: .eventId(eventId: UUID().uuidString)),
underlyingHandle: .init(noPointer: .init()))
}
}
extension Receipt {
var dateTimestamp: Date? {
guard let timestamp else {