mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-22 09:32:52 +02:00
add composer actions/modules and ability to send rich messages
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user