diff --git a/lib/hipchat/room.rb b/lib/hipchat/room.rb index a60cb0e..015da17 100644 --- a/lib/hipchat/room.rb +++ b/lib/hipchat/room.rb @@ -129,8 +129,8 @@ def send_message(message) # +notify+:: true or false # (default false) def send(from, message, options_or_notify = {}) - if from.length > 15 - raise UsernameTooLong, "Username #{from} is `#{from.length} characters long. Limit is 15'" + if from.length > 20 + raise UsernameTooLong, "Username #{from} is `#{from.length} characters long. Limit is 20'" end options = if options_or_notify == true or options_or_notify == false warn 'DEPRECATED: Specify notify flag as an option (e.g., :notify => true)' @@ -162,8 +162,8 @@ def send(from, message, options_or_notify = {}) end def share_link(from, message, link) - if from.length > 15 - raise UsernameTooLong, "Username #{from} is `#{from.length} characters long. Limit is 15'" + if from.length > 20 + raise UsernameTooLong, "Username #{from} is `#{from.length} characters long. Limit is 20'" end response = self.class.post(@api.share_link_config[:url], @@ -188,8 +188,8 @@ def share_link(from, message, link) # # Default # send_file 'nickname', 'some message', File.open("/path/to/file") def send_file(from, message, file) - if from.length > 15 - raise UsernameTooLong, "Username #{from} is `#{from.length} characters long. Limit is 15'" + if from.length > 20 + raise UsernameTooLong, "Username #{from} is `#{from.length} characters long. Limit is 20'" end response = self.class.post(@api.send_file_config[:url],