From c0e1bbbb23f51bf1a32798a220b088ff411a101e Mon Sep 17 00:00:00 2001 From: Mark Madsen Date: Fri, 24 Feb 2012 01:12:38 -0700 Subject: [PATCH] allow user info on a presence channe; --- lib/pusher-client/socket.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/pusher-client/socket.rb b/lib/pusher-client/socket.rb index cda8b35..316176a 100644 --- a/lib/pusher-client/socket.rb +++ b/lib/pusher-client/socket.rb @@ -80,8 +80,8 @@ def disconnect end end - def subscribe(channel_name, user_id = nil) - @user_data = {:user_id => user_id}.to_json unless user_id.nil? + def subscribe(channel_name, user_id = nil, options={}) + @user_data = {:user_id => user_id, :user_info => options}.to_json unless user_id.nil? channel = @channels << channel_name if @connected