mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Support sending gallery messages behind a feature flag (#5909)
dds sending of multi-media "gallery" messages, gated behind the new galleryEnabled developer option (Developer Options → Room, off by default). Rendering of received galleries ships in a separate PR. Wires sendGallery through TimelineProxy/TimelineController onto the SDK's Timeline.sendGallery. MediaUploadPreviewScreen sends selected items as one gallery when the flag is on. Co-authored with the original author of #5601. NOTE: This PR allows to send gallery messages, but they won't be rendered without the gallery timeline item PR.
This commit is contained in:
@@ -162,6 +162,16 @@ struct TimelineControllerMockConfiguration {
|
||||
return .success(())
|
||||
}
|
||||
|
||||
sendGalleryItemInfosCaptionInReplyToEventIDClosure = { [weak self, timelineProxy] itemInfos, caption, inReplyToEventID in
|
||||
self?.callbacks.send(.messageSentOrEdited)
|
||||
if let timelineProxy {
|
||||
return await timelineProxy.sendGallery(itemInfos: itemInfos,
|
||||
caption: caption,
|
||||
inReplyToEventID: inReplyToEventID).mapError(TimelineControllerError.timelineProxyError)
|
||||
}
|
||||
return .success(())
|
||||
}
|
||||
|
||||
sendVoiceMessageUrlAudioInfoWaveformRequestHandleClosure = { [weak self, timelineProxy] url, audioInfo, waveform, requestHandle in
|
||||
self?.callbacks.send(.messageSentOrEdited)
|
||||
if let timelineProxy {
|
||||
|
||||
Reference in New Issue
Block a user