Skip to content

Commit

Permalink
element-hq/element-ios/issues/4090 - Switched the sendVoiceMessage me…
Browse files Browse the repository at this point in the history
…thod duration parameter to an integer.
  • Loading branch information
stefanceriu committed Jul 16, 2021
1 parent ebbebc0 commit 2336a17
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion MatrixSDK/Contrib/Swift/Data/MXRoom.swift
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ public extension MXRoom {
- returns: a `MXHTTPOperation` instance.
*/

@nonobjc @discardableResult func sendVoiceMessage(localURL: URL, mimeType: String?, duration: TimeInterval, samples: [Float]?, localEcho: inout MXEvent?, completion: @escaping (_ response: MXResponse<String?>) -> Void) -> MXHTTPOperation {
@nonobjc @discardableResult func sendVoiceMessage(localURL: URL, mimeType: String?, duration: UInt, samples: [Float]?, localEcho: inout MXEvent?, completion: @escaping (_ response: MXResponse<String?>) -> Void) -> MXHTTPOperation {
let boxedSamples = samples?.compactMap { NSNumber(value: $0) }
return __sendVoiceMessage(localURL, mimeType: mimeType, duration: duration, samples: boxedSamples, localEcho: &localEcho, success: currySuccess(completion), failure: curryFailure(completion), keepActualFilename: false)
}
Expand Down
2 changes: 1 addition & 1 deletion MatrixSDK/Data/MXRoom.h
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ FOUNDATION_EXPORT NSInteger const kMXRoomAlreadyJoinedErrorCode;
*/
- (MXHTTPOperation*)sendVoiceMessage:(NSURL*)fileLocalURL
mimeType:(NSString*)mimeType
duration:(NSTimeInterval)duration
duration:(NSUInteger)duration
samples:(NSArray<NSNumber *> *)samples
localEcho:(MXEvent**)localEcho
success:(void (^)(NSString *eventId))success
Expand Down
2 changes: 1 addition & 1 deletion MatrixSDK/Data/MXRoom.m
Original file line number Diff line number Diff line change
Expand Up @@ -1427,7 +1427,7 @@ - (MXHTTPOperation*)sendAudioFile:(NSURL*)fileLocalURL

- (MXHTTPOperation*)sendVoiceMessage:(NSURL*)fileLocalURL
mimeType:(NSString*)mimeType
duration:(NSTimeInterval)duration
duration:(NSUInteger)duration
samples:(NSArray<NSNumber *> *)samples
localEcho:(MXEvent**)localEcho
success:(void (^)(NSString *eventId))success
Expand Down

0 comments on commit 2336a17

Please sign in to comment.