RocketChat's Chat Messages.
Remove a chat message.
require 'rocketchat'
rocket_server = RocketChat::Server.new('http://your.server.address/')
session = rocket_server.login('username', 'password')
session.chat.delete(room_id: 'some_channel_id', msg_id: 'some_message_id',
as_user: false)
Retrieves a chat message for the provided id.
require 'rocketchat'
rocket_server = RocketChat::Server.new('http://your.server.address/')
session = rocket_server.login('username', 'password')
message = session.chat.get_message(msg_id: 'some_message_id')
Post a message to a RocketChat channel.
require 'rocketchat'
rocket_server = RocketChat::Server.new('http://your.server.address/')
session = rocket_server.login('username', 'password')
message = session.chat.post_message(room_id: 'some_message_id',
text: 'hello, rocket.chat')
Post a message in a thread.
require 'rocketchat'
rocket_server = RocketChat::Server.new('http://your.server.address/')
session = rocket_server.login('username', 'password')
message = session.chat.post_message(room_id: 'some_message_id',
text: 'hello, rocket.chat',
tmid: 'gcGai9bRREqokjyPc')
Update an existing message.
require 'rocketchat'
rocket_server = RocketChat::Server.new('http://your.server.address/')
session = rocket_server.login('username', 'password')
session.chat.update(room_id: 'some_channel_id', msg_id: 'some_message_id',
text: 'Hi, Rocket.chat')