Update the SDK and use media filename and caption internally. (#3375)

Doesn't render captions (other than in fallback places).
This commit is contained in:
Doug
2024-10-08 11:00:58 +01:00
committed by GitHub
parent 794d0eead1
commit 6e51969d27
42 changed files with 581 additions and 358 deletions
@@ -206,16 +206,26 @@ struct MessageComposer_Previews: PreviewProvider, TestablePreview {
static let replyTypes: [TimelineItemReplyDetails] = [
.loaded(sender: .init(id: "Dave"),
eventID: "123",
eventContent: .message(.audio(.init(body: "Audio: Ride the lightning", duration: 100, waveform: nil, source: nil, contentType: nil)))),
eventContent: .message(.audio(.init(filename: "lightning.mp3",
caption: "Audio: Ride the lightning",
duration: 100,
waveform: nil,
source: nil,
contentType: nil)))),
.loaded(sender: .init(id: "James"),
eventID: "123",
eventContent: .message(.emote(.init(body: "Emote: James thinks he's the phantom lord")))),
.loaded(sender: .init(id: "Robert"),
eventID: "123",
eventContent: .message(.file(.init(body: "File: Crash course in brain surgery.pdf", source: nil, thumbnailSource: nil, contentType: nil)))),
eventContent: .message(.file(.init(filename: "brain-surgery.pdf",
caption: "File: Crash course in brain surgery",
source: nil,
thumbnailSource: nil,
contentType: nil)))),
.loaded(sender: .init(id: "Cliff"),
eventID: "123",
eventContent: .message(.image(.init(body: "Image: Pushead",
eventContent: .message(.image(.init(filename: "head.png",
caption: "Image: Pushead",
source: .init(url: .picturesDirectory, mimeType: nil),
thumbnailSource: .init(url: .picturesDirectory, mimeType: nil))))),
.loaded(sender: .init(id: "Jason"),
@@ -226,7 +236,8 @@ struct MessageComposer_Previews: PreviewProvider, TestablePreview {
eventContent: .message(.text(.init(body: "Text: Where the wild things are")))),
.loaded(sender: .init(id: "Lars"),
eventID: "123",
eventContent: .message(.video(.init(body: "Video: Through the never",
eventContent: .message(.video(.init(filename: "never.mov",
caption: "Video: Through the never",
duration: 100,
source: nil,
thumbnailSource: .init(url: .picturesDirectory, mimeType: nil))))),