Created
April 24, 2013 09:37
-
-
Save boska/5450963 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
- (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