Sha256: edd55cf3de3af1fdf4af7b6258796ef79c0338838055c4aaeafd871282b8d13b

Contents?: true

Size: 466 Bytes

Versions: 11

Compression:

Stored size: 466 Bytes

Contents

module MatrixQQ
  class Matrix
    module Send
      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

      def self.text(dbus, room_id, message)
        raw dbus, room_id, 'm.room.message', msgtype: 'm.text', body: message
      end
    end # Send
  end # Matrix
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
matrix_qq-0.5.5 lib/matrix_qq/matrix/send.rb
matrix_qq-0.5.4 lib/matrix_qq/matrix/send.rb
matrix_qq-0.5.3 lib/matrix_qq/matrix/send.rb
matrix_qq-0.5.2 lib/matrix_qq/matrix/send.rb
matrix_qq-0.5.1 lib/matrix_qq/matrix/send.rb
matrix_qq-0.5.0 lib/matrix_qq/matrix/send.rb
matrix_qq-0.4.0 lib/matrix_qq/matrix/send.rb
matrix_qq-0.3.3 lib/matrix_qq/matrix/send.rb
matrix_qq-0.3.2 lib/matrix_qq/matrix/send.rb
matrix_qq-0.3.1 lib/matrix_qq/matrix/send.rb
matrix_qq-0.3.0 lib/matrix_qq/matrix/send.rb