@@ -1857,7 +1857,7 @@ public protocol MessageProtocol {
1857
1857
func inReplyTo() -> InReplyToDetails?
1858
1858
func isEdited() -> Bool
1859
1859
func isThreaded() -> Bool
1860
- func msgtype() -> MessageType?
1860
+ func msgtype() -> MessageType
1861
1861
1862
1862
}
1863
1863
@@ -1924,8 +1924,8 @@ public class Message: MessageProtocol {
1924
1924
)
1925
1925
}
1926
1926
1927
- public func msgtype() -> MessageType? {
1928
- return try! FfiConverterOptionTypeMessageType .lift(
1927
+ public func msgtype() -> MessageType {
1928
+ return try! FfiConverterTypeMessageType .lift(
1929
1929
try!
1930
1930
rustCall() {
1931
1931
@@ -2828,6 +2828,7 @@ public protocol RoomProtocol {
2828
2828
func sendReadReceipt(eventId: String) throws
2829
2829
func sendReply(msg: RoomMessageEventContentWithoutRelation, replyItem: EventTimelineItem) throws
2830
2830
func sendVideo(url: String, thumbnailUrl: String, videoInfo: VideoInfo, progressWatcher: ProgressWatcher?) -> SendAttachmentJoinHandle
2831
+ func sendVoiceMessage(url: String, audioInfo: AudioInfo, waveform: [UInt16], progressWatcher: ProgressWatcher?) -> SendAttachmentJoinHandle
2831
2832
func setName(name: String) throws
2832
2833
func setTopic(topic: String) throws
2833
2834
func subscribeToBackPaginationStatus(listener: BackPaginationStatusListener) throws -> TaskHandle
@@ -3702,6 +3703,21 @@ public class Room: RoomProtocol {
3702
3703
)
3703
3704
}
3704
3705
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
+
3705
3721
public func setName(name: String) throws {
3706
3722
try
3707
3723
rustCallWithError(FfiConverterTypeClientError.lift) {
@@ -10973,6 +10989,7 @@ public enum MessageType {
10973
10989
case notice(content: NoticeMessageContent)
10974
10990
case text(content: TextMessageContent)
10975
10991
case location(content: LocationContent)
10992
+ case other(msgtype: String, body: String)
10976
10993
}
10977
10994
10978
10995
public struct FfiConverterTypeMessageType: FfiConverterRustBuffer {
@@ -11014,6 +11031,11 @@ public struct FfiConverterTypeMessageType: FfiConverterRustBuffer {
11014
11031
content: try FfiConverterTypeLocationContent.read(from: &buf)
11015
11032
)
11016
11033
11034
+ case 9: return .other(
11035
+ msgtype: try FfiConverterString.read(from: &buf),
11036
+ body: try FfiConverterString.read(from: &buf)
11037
+ )
11038
+
11017
11039
default: throw UniffiInternalError.unexpectedEnumCase
11018
11040
}
11019
11041
}
@@ -11061,6 +11083,12 @@ public struct FfiConverterTypeMessageType: FfiConverterRustBuffer {
11061
11083
writeInt(&buf, Int32(8))
11062
11084
FfiConverterTypeLocationContent.write(content, into: &buf)
11063
11085
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
+
11064
11092
}
11065
11093
}
11066
11094
}
@@ -16242,27 +16270,6 @@ fileprivate struct FfiConverterOptionTypeMembershipChange: FfiConverterRustBuffe
16242
16270
}
16243
16271
}
16244
16272
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
-
16266
16273
fileprivate struct FfiConverterOptionTypePushFormat: FfiConverterRustBuffer {
16267
16274
typealias SwiftType = PushFormat?
16268
16275
@@ -17094,9 +17101,9 @@ public func messageEventContentFromMarkdownAsEmote(md: String) -> RoomMessageEv
17094
17101
)
17095
17102
}
17096
17103
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 ) {
17100
17107
uniffi_matrix_sdk_ffi_fn_func_message_event_content_new(
17101
17108
FfiConverterTypeMessageType.lower(msgtype),$0)
17102
17109
}
@@ -17180,7 +17187,7 @@ private var initializationResult: InitializationResult {
17180
17187
if (uniffi_matrix_sdk_ffi_checksum_func_message_event_content_from_markdown_as_emote() != 16575) {
17181
17188
return InitializationResult.apiChecksumMismatch
17182
17189
}
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 ) {
17184
17191
return InitializationResult.apiChecksumMismatch
17185
17192
}
17186
17193
if (uniffi_matrix_sdk_ffi_checksum_func_new_virtual_element_call_widget() != 13275) {
@@ -17429,7 +17436,7 @@ private var initializationResult: InitializationResult {
17429
17436
if (uniffi_matrix_sdk_ffi_checksum_method_message_is_threaded() != 29945) {
17430
17437
return InitializationResult.apiChecksumMismatch
17431
17438
}
17432
- if (uniffi_matrix_sdk_ffi_checksum_method_message_msgtype() != 50686 ) {
17439
+ if (uniffi_matrix_sdk_ffi_checksum_method_message_msgtype() != 35166 ) {
17433
17440
return InitializationResult.apiChecksumMismatch
17434
17441
}
17435
17442
if (uniffi_matrix_sdk_ffi_checksum_method_notificationclient_get_notification() != 9907) {
@@ -17747,6 +17754,9 @@ private var initializationResult: InitializationResult {
17747
17754
if (uniffi_matrix_sdk_ffi_checksum_method_room_send_video() != 38775) {
17748
17755
return InitializationResult.apiChecksumMismatch
17749
17756
}
17757
+ if (uniffi_matrix_sdk_ffi_checksum_method_room_send_voice_message() != 15857) {
17758
+ return InitializationResult.apiChecksumMismatch
17759
+ }
17750
17760
if (uniffi_matrix_sdk_ffi_checksum_method_room_set_name() != 56429) {
17751
17761
return InitializationResult.apiChecksumMismatch
17752
17762
}
0 commit comments