lib/rocket_chat/messages/group.rb in rocketchat-0.1.9 vs lib/rocket_chat/messages/group.rb in rocketchat-0.1.10
- old
+ new
@@ -50,13 +50,13 @@
# @param [Hash] sort Query field sort hash. eg `{ msgs: 1, name: -1 }`
# @param [Hash] fields Query fields to return. eg `{ name: 1, ro: 0 }`
# @return [Room[]]
# @raise [HTTPError, StatusError]
#
- def list(offset: nil, count: nil, sort: nil, fields: nil)
+ def list(offset: nil, count: nil, sort: nil, fields: nil, query: nil)
response = session.request_json(
'/api/v1/groups.list',
- body: build_list_body(offset, count, sort, fields)
+ body: build_list_body(offset, count, sort, fields, query)
)
response['groups'].map { |hash| RocketChat::Room.new hash } if response['success']
end