Skip to content

Instantly share code, notes, and snippets.

@boska
Created April 24, 2013 09:37
Show Gist options
  • Save boska/5450963 to your computer and use it in GitHub Desktop.
Save boska/5450963 to your computer and use it in GitHub Desktop.
- (BOOL)enterChatRoom:(NSString*)chatRoomJid{
//這裡的chatRoomJID應該只有user
/*
if(_xmppRoom){
[self quitChatRoom:nil];
}*/
XMPPJID *jid=[XMPPJID jidWithString:chatRoomJid];
/*
_xmppRoom=[[HSXMPPRoom alloc] initWithRoomStorage:[XMPPRoomCoreDataStorage sharedInstance] jid:jid];
[_xmppRoom addDelegate:_xmppRoom delegateQueue:dispatch_get_main_queue()];
[_xmppRoom activate:_xmppStream];
[_xmppRoom joinRoomUsingNickname:[_xmppStream.myJID user] history:nil];
*/
XMPPRoom *xmppRoom =[[HSXMPPRoom alloc] initWithRoomStorage:[XMPPRoomCoreDataStorage sharedInstance] jid:jid];
[xmppRoom addDelegate:_xmppRoom delegateQueue:dispatch_get_main_queue()];
[xmppRoom activate:_xmppStream];
[xmppRoom joinRoomUsingNickname:[_xmppStream.myJID user] history:nil];
return YES;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment