lib/twilio-ruby/rest/chat/v2/service/user.rb in twilio-ruby-5.12.2 vs lib/twilio-ruby/rest/chat/v2/service/user.rb in twilio-ruby-5.12.3

- old
+ new

@@ -247,11 +247,17 @@ end ## # Access the user_channels # @return [UserChannelList] - # @return [UserChannelContext] - def user_channels + # @return [UserChannelContext] if channel_sid was passed. + def user_channels(channel_sid=:unset) + raise ArgumentError, 'channel_sid cannot be nil' if channel_sid.nil? + + if channel_sid != :unset + return UserChannelContext.new(@version, @solution[:service_sid], @solution[:sid], channel_sid, ) + end + unless @user_channels @user_channels = UserChannelList.new( @version, service_sid: @solution[:service_sid], user_sid: @solution[:sid], \ No newline at end of file