本文介绍了Xmpp IOS多用户聊天。我没有找到接受小组邀请的方法?我怎么能接受这个邀请函的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我发送邀请时,此功能被调用,但我无法理解代码行应该用于接受邀请* 。我试图创建一个多用户和多组邀请也
称为收到消息功能。
When i send invitation this function is called but i can't understand what line of code should use for accept invitation*. am trying to create a multi user and multi groups invitation alsocalled did received message function.
- (void)xmppMUC:(XMPPMUC *) sender roomJID:(XMPPJID *) roomJID didReceiveInvitation:(XMPPMessage *)message
{
}
推荐答案
接受来电邀请:
- (void)xmppMUC:(XMPPMUC *)sender roomJID:(XMPPJID *) roomJID didReceiveInvitation:(XMPPMessage *)message
{ XMPPRoom *mu = [[XMPPRoom alloc] initWithRoomStorage:xmpproomMstorage jid:roomJID
dispatchQueue:dispatch_get_main_queue()];
[mu activate:xmppStream];
[mu addDelegate:self delegateQueue:dispatch_get_main_queue()];
self.toSomeOne = roomJID;
[mu activate: self.xmppStream];
[mu fetchConfigurationForm];
[mu addDelegate:self delegateQueue:dispatch_get_main_queue()];
[mu joinRoomUsingNickname:xmppStream.YourJid.user history:nil password:@"Your Password"];
self.toSomeOne = roomJID;
XMPPPresence *presence = [XMPPPresence presence];
[[self xmppStream] sendElement:presence];
[xmppRoster addUser:roomJID withNickname:roomJID.full];
[self goOnline];
}
这篇关于Xmpp IOS多用户聊天。我没有找到接受小组邀请的方法?我怎么能接受这个邀请函的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!