Created
November 18, 2011 22:34
-
-
Save devinfoley/1377988 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)pusher:(PTPusher *)pusher connectionDidConnect:(PTPusherConnection *)connection { | |
NSLog(@"PTPusher:connectionDidConnect %@", @"Connected"); | |
if (user != NULL) { | |
NSString* channelName = [NSString stringWithFormat:@"user-%d", user.userId]; | |
NSLog(@"Subscribing to %@", channelName); | |
PTPusherChannel* channel = [self.pusher channelNamed:channelName]; | |
if (channel != NULL) { | |
[self.pusher unsubscribeFromChannel:channel]; | |
} | |
[self.pusher subscribeToChannelNamed:channelName]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment