Update SDK to 1.0.94-alpha (#1232)

* Update SDK

* Map new location fields

* Add LocationRoomTimelineItemContent.AssetType
This commit is contained in:
Alfonso Grillo
2023-07-04 08:39:32 +02:00
committed by GitHub
parent 4162036f83
commit caf23094b0
16 changed files with 89 additions and 36 deletions
@@ -399,7 +399,11 @@ struct RoomTimelineItemFactory: RoomTimelineItemFactoryProtocol {
}
private func buildLocationTimelineItemContent(_ locationContent: LocationContent) -> LocationRoomTimelineItemContent {
LocationRoomTimelineItemContent(body: locationContent.body, geoURI: .init(string: locationContent.geoUri))
LocationRoomTimelineItemContent(body: locationContent.body,
geoURI: .init(string: locationContent.geoUri),
description: locationContent.description,
zoomLevel: locationContent.zoomLevel,
asset: locationContent.asset.map { .init(assetType: $0) })
}
private func buildFileTimelineItemContent(_ messageContent: FileMessageContent) -> FileRoomTimelineItemContent {
@@ -528,3 +532,14 @@ struct RoomTimelineItemFactory: RoomTimelineItemFactoryProtocol {
}
}
}
private extension LocationRoomTimelineItemContent.AssetType {
init(assetType: MatrixRustSDK.AssetType) {
switch assetType {
case .sender:
self = .sender
case .pin:
self = .pin
}
}
}