rocketweekly/lib/rocketchat/channel.rb

16 lines
380 B
Ruby
Raw Normal View History

2018-07-07 03:46:11 +00:00
module RocketChat
module Messages
class Channel < Room
def history(room: nil, since: nil, count: 10)
response = session.request_json(
'/api/v1/channels.history',
body: {
roomId: room,
oldest: since,
count: count
})
response['messages'] if response['success']
end
end
end
end