Module: MatrixQQ::Matrix::Send
- Defined in:
- lib/matrix_qq/matrix/send.rb
Class Method Summary collapse
Class Method Details
.raw(dbus, room_id, event_type, body) ⇒ Object
4 5 6 7 8 9 |
# File 'lib/matrix_qq/matrix/send.rb', line 4 def self.raw(dbus, room_id, event_type, body) txn_id = SecureRandom.hex(32) puts "send #{body}" if $VERBOSE uri = "/rooms/#{room_id}/send/#{event_type}/#{txn_id}" dbus.put uri, body.merge(forword: false) end |
.text(dbus, room_id, message) ⇒ Object
11 12 13 |
# File 'lib/matrix_qq/matrix/send.rb', line 11 def self.text(dbus, room_id, ) raw dbus, room_id, 'm.room.message', msgtype: 'm.text', body: end |