add composer actions/modules and ability to send rich messages

This commit is contained in:
David Langley
2022-10-04 15:01:01 +01:00
parent bac5b7f112
commit cd2776f458
9 changed files with 176 additions and 97 deletions
@@ -52,6 +52,28 @@ extension RoomViewController {
}
/// Send given attributed text message to the room
///
/// - Parameter attributedTextMsg: the attributed text message
@objc func sendFormattedTextMessage(_ rawTextMsg: String, htmlMsg: String) {
let eventModified = self.roomDataSource.event(withEventId: customizedRoomDataSource?.selectedEventId)
self.setupRoomDataSource { roomDataSource in
guard let roomDataSource = roomDataSource as? RoomDataSource else { return }
roomDataSource.sendFormattedTextMessage(rawTextMsg, html: htmlMsg) { response in
switch response {
case .success:
break
case .failure:
MXLog.error("[RoomViewController] sendFormattedTextMessage failed")
}
}
if self.customizedRoomDataSource?.selectedEventId != nil {
self.cancelEventSelection()
}
}
}
/// Send given attributed text message to the room
///
/// - Parameter attributedTextMsg: the attributed text message