@@ -1857,7 +1857,7 @@ public protocol MessageProtocol {
18571857 func inReplyTo() -> InReplyToDetails?
18581858 func isEdited() -> Bool
18591859 func isThreaded() -> Bool
1860- func msgtype() -> MessageType?
1860+ func msgtype() -> MessageType
18611861
18621862}
18631863
@@ -1924,8 +1924,8 @@ public class Message: MessageProtocol {
19241924 )
19251925 }
19261926
1927- public func msgtype() -> MessageType? {
1928- return try! FfiConverterOptionTypeMessageType .lift(
1927+ public func msgtype() -> MessageType {
1928+ return try! FfiConverterTypeMessageType .lift(
19291929 try!
19301930 rustCall() {
19311931
@@ -2828,6 +2828,7 @@ public protocol RoomProtocol {
28282828 func sendReadReceipt(eventId: String) throws
28292829 func sendReply(msg: RoomMessageEventContentWithoutRelation, replyItem: EventTimelineItem) throws
28302830 func sendVideo(url: String, thumbnailUrl: String, videoInfo: VideoInfo, progressWatcher: ProgressWatcher?) -> SendAttachmentJoinHandle
2831+ func sendVoiceMessage(url: String, audioInfo: AudioInfo, waveform: [UInt16], progressWatcher: ProgressWatcher?) -> SendAttachmentJoinHandle
28312832 func setName(name: String) throws
28322833 func setTopic(topic: String) throws
28332834 func subscribeToBackPaginationStatus(listener: BackPaginationStatusListener) throws -> TaskHandle
@@ -3702,6 +3703,21 @@ public class Room: RoomProtocol {
37023703 )
37033704 }
37043705
3706+ public func sendVoiceMessage(url: String, audioInfo: AudioInfo, waveform: [UInt16], progressWatcher: ProgressWatcher?) -> SendAttachmentJoinHandle {
3707+ return try! FfiConverterTypeSendAttachmentJoinHandle.lift(
3708+ try!
3709+ rustCall() {
3710+
3711+ uniffi_matrix_sdk_ffi_fn_method_room_send_voice_message(self.pointer,
3712+ FfiConverterString.lower(url),
3713+ FfiConverterTypeAudioInfo.lower(audioInfo),
3714+ FfiConverterSequenceUInt16.lower(waveform),
3715+ FfiConverterOptionCallbackInterfaceProgressWatcher.lower(progressWatcher),$0
3716+ )
3717+ }
3718+ )
3719+ }
3720+
37053721 public func setName(name: String) throws {
37063722 try
37073723 rustCallWithError(FfiConverterTypeClientError.lift) {
@@ -10973,6 +10989,7 @@ public enum MessageType {
1097310989 case notice(content: NoticeMessageContent)
1097410990 case text(content: TextMessageContent)
1097510991 case location(content: LocationContent)
10992+ case other(msgtype: String, body: String)
1097610993}
1097710994
1097810995public struct FfiConverterTypeMessageType: FfiConverterRustBuffer {
@@ -11014,6 +11031,11 @@ public struct FfiConverterTypeMessageType: FfiConverterRustBuffer {
1101411031 content: try FfiConverterTypeLocationContent.read(from: &buf)
1101511032 )
1101611033
11034+ case 9: return .other(
11035+ msgtype: try FfiConverterString.read(from: &buf),
11036+ body: try FfiConverterString.read(from: &buf)
11037+ )
11038+
1101711039 default: throw UniffiInternalError.unexpectedEnumCase
1101811040 }
1101911041 }
@@ -11061,6 +11083,12 @@ public struct FfiConverterTypeMessageType: FfiConverterRustBuffer {
1106111083 writeInt(&buf, Int32(8))
1106211084 FfiConverterTypeLocationContent.write(content, into: &buf)
1106311085
11086+
11087+ case let .other(msgtype,body):
11088+ writeInt(&buf, Int32(9))
11089+ FfiConverterString.write(msgtype, into: &buf)
11090+ FfiConverterString.write(body, into: &buf)
11091+
1106411092 }
1106511093 }
1106611094}
@@ -16242,27 +16270,6 @@ fileprivate struct FfiConverterOptionTypeMembershipChange: FfiConverterRustBuffe
1624216270 }
1624316271}
1624416272
16245- fileprivate struct FfiConverterOptionTypeMessageType: FfiConverterRustBuffer {
16246- typealias SwiftType = MessageType?
16247-
16248- public static func write(_ value: SwiftType, into buf: inout [UInt8]) {
16249- guard let value = value else {
16250- writeInt(&buf, Int8(0))
16251- return
16252- }
16253- writeInt(&buf, Int8(1))
16254- FfiConverterTypeMessageType.write(value, into: &buf)
16255- }
16256-
16257- public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SwiftType {
16258- switch try readInt(&buf) as Int8 {
16259- case 0: return nil
16260- case 1: return try FfiConverterTypeMessageType.read(from: &buf)
16261- default: throw UniffiInternalError.unexpectedOptionalTag
16262- }
16263- }
16264- }
16265-
1626616273fileprivate struct FfiConverterOptionTypePushFormat: FfiConverterRustBuffer {
1626716274 typealias SwiftType = PushFormat?
1626816275
@@ -17094,9 +17101,9 @@ public func messageEventContentFromMarkdownAsEmote(md: String) -> RoomMessageEv
1709417101 )
1709517102}
1709617103
17097- public func messageEventContentNew(msgtype: MessageType) -> RoomMessageEventContentWithoutRelation {
17098- return try! FfiConverterTypeRoomMessageEventContentWithoutRelation.lift(
17099- try! rustCall( ) {
17104+ public func messageEventContentNew(msgtype: MessageType) throws -> RoomMessageEventContentWithoutRelation {
17105+ return try FfiConverterTypeRoomMessageEventContentWithoutRelation.lift(
17106+ try rustCallWithError(FfiConverterTypeClientError.lift ) {
1710017107 uniffi_matrix_sdk_ffi_fn_func_message_event_content_new(
1710117108 FfiConverterTypeMessageType.lower(msgtype),$0)
1710217109}
@@ -17180,7 +17187,7 @@ private var initializationResult: InitializationResult {
1718017187 if (uniffi_matrix_sdk_ffi_checksum_func_message_event_content_from_markdown_as_emote() != 16575) {
1718117188 return InitializationResult.apiChecksumMismatch
1718217189 }
17183- if (uniffi_matrix_sdk_ffi_checksum_func_message_event_content_new() != 65448 ) {
17190+ if (uniffi_matrix_sdk_ffi_checksum_func_message_event_content_new() != 60536 ) {
1718417191 return InitializationResult.apiChecksumMismatch
1718517192 }
1718617193 if (uniffi_matrix_sdk_ffi_checksum_func_new_virtual_element_call_widget() != 13275) {
@@ -17429,7 +17436,7 @@ private var initializationResult: InitializationResult {
1742917436 if (uniffi_matrix_sdk_ffi_checksum_method_message_is_threaded() != 29945) {
1743017437 return InitializationResult.apiChecksumMismatch
1743117438 }
17432- if (uniffi_matrix_sdk_ffi_checksum_method_message_msgtype() != 50686 ) {
17439+ if (uniffi_matrix_sdk_ffi_checksum_method_message_msgtype() != 35166 ) {
1743317440 return InitializationResult.apiChecksumMismatch
1743417441 }
1743517442 if (uniffi_matrix_sdk_ffi_checksum_method_notificationclient_get_notification() != 9907) {
@@ -17747,6 +17754,9 @@ private var initializationResult: InitializationResult {
1774717754 if (uniffi_matrix_sdk_ffi_checksum_method_room_send_video() != 38775) {
1774817755 return InitializationResult.apiChecksumMismatch
1774917756 }
17757+ if (uniffi_matrix_sdk_ffi_checksum_method_room_send_voice_message() != 15857) {
17758+ return InitializationResult.apiChecksumMismatch
17759+ }
1775017760 if (uniffi_matrix_sdk_ffi_checksum_method_room_set_name() != 56429) {
1775117761 return InitializationResult.apiChecksumMismatch
1775217762 }
0 commit comments