mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Add message sending methods to the TimelineController that will automatically use the correct timeline proxy instance internally.
This commit is contained in:
committed by
Stefan Ceriu
parent
a4c0b7f91c
commit
35195abc35
+33
-1
@@ -31,6 +31,7 @@ enum TimelineControllerAction {
|
||||
enum TimelineControllerError: Error {
|
||||
case generic
|
||||
case eventNotFound
|
||||
case timelineProxyError(TimelineProxyError)
|
||||
}
|
||||
|
||||
/// This protocol is a high level abstraction on top of the ``TimelineProxyProtocol``
|
||||
@@ -98,5 +99,36 @@ protocol TimelineControllerProtocol {
|
||||
inReplyToEventID: String?,
|
||||
intentionalMentions: IntentionalMentions) async
|
||||
|
||||
func sendVoiceMessage(url: URL, audioInfo: AudioInfo, waveform: [UInt16]) async -> Result<Void, TimelineProxyError>
|
||||
func sendAudio(url: URL,
|
||||
audioInfo: AudioInfo,
|
||||
caption: String?,
|
||||
requestHandle: @MainActor (SendAttachmentJoinHandleProtocol) -> Void) async -> Result<Void, TimelineControllerError>
|
||||
|
||||
func sendFile(url: URL,
|
||||
fileInfo: FileInfo,
|
||||
caption: String?,
|
||||
requestHandle: @MainActor (SendAttachmentJoinHandleProtocol) -> Void) async -> Result<Void, TimelineControllerError>
|
||||
|
||||
func sendImage(url: URL,
|
||||
thumbnailURL: URL,
|
||||
imageInfo: ImageInfo,
|
||||
caption: String?,
|
||||
requestHandle: @MainActor (SendAttachmentJoinHandleProtocol) -> Void) async -> Result<Void, TimelineControllerError>
|
||||
|
||||
func sendLocation(body: String,
|
||||
geoURI: GeoURI,
|
||||
description: String?,
|
||||
zoomLevel: UInt8?,
|
||||
assetType: AssetType?) async -> Result<Void, TimelineControllerError>
|
||||
|
||||
func sendVideo(url: URL,
|
||||
thumbnailURL: URL,
|
||||
videoInfo: VideoInfo,
|
||||
caption: String?,
|
||||
requestHandle: @MainActor (SendAttachmentJoinHandleProtocol) -> Void) async -> Result<Void, TimelineControllerError>
|
||||
|
||||
func sendVoiceMessage(url: URL,
|
||||
audioInfo: AudioInfo,
|
||||
waveform: [UInt16],
|
||||
requestHandle: @MainActor (SendAttachmentJoinHandleProtocol) -> Void) async -> Result<Void, TimelineControllerError>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user