Method: MatrixSdk::Room#send_html
- Defined in:
- lib/matrix_sdk/room.rb
#send_html(html, body = nil, msg_type = 'm.text') ⇒ Object
Sends a custom HTML message to the room
183 184 185 186 187 188 189 190 191 192 |
# File 'lib/matrix_sdk/room.rb', line 183 def send_html(html, body = nil, msg_type = 'm.text') content = { body: body || html.gsub(/<\/?[^>]*>/, ''), msgtype: msg_type, format: 'org.matrix.custom.html', formatted_body: html } client.api.(id, 'm.room.message', content) end |