abrom / rocketchat-ruby

Ruby wrapper for RocketChat v1 REST API
MIT License
33 stars 24 forks source link

Add and remove moderator from room #14

Closed danischreiber closed 7 years ago

danischreiber commented 7 years ago

Not sure it's necessary - I'd rather let the server handle the errors anyway.

On Tue, Aug 15, 2017 at 3:47 PM, Andrew Bromwich notifications@github.com wrote:

@abrom commented on this pull request.

In lib/rocket_chat/messages/room.rb https://github.com/abrom/rocketchat-ruby/pull/14#discussion_r133180428:

@@ -99,6 +99,44 @@ def remove_owner(room_id: nil, user_id: nil) end

   #
  • *.add_moderator REST API

  • @param [String] room_id Rocket.Chat room id

  • @param [String] user_id Rocket.Chat user id

  • @return [Boolean]

  • @raise [HTTPError, StatusError]

  • #
  • def add_moderator(room_id: nil, user_id: nil)

Given room_id and user_id are both required arguments, might be a good idea to validate pre-flight. The server will handle it of course. Thoughts?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/abrom/rocketchat-ruby/pull/14#pullrequestreview-56330287, or mute the thread https://github.com/notifications/unsubscribe-auth/AEWU-6eXrhZpK3YRldfwg1UtuMHNXow1ks5sYZN1gaJpZM4O2dFa .