简体   繁体   English

如何在MUC会议室XMPP中添加组-iOS

[英]How to add a group in MUC room XMPP - iOS

I want to add a group for eg VP to the chat room (XYZ Company). 我想将例如VP的组添加到聊天室(XYZ公司)。 I am able to add a individual user to a chat room but i want to add a particular group to chat room. 我可以向聊天室添加单个用户,但我想向聊天室添加特定的群组。 How can i achieve that? 我该如何实现?

I tried the following code 我尝试了以下代码

XMPPJID *userJid = [XMPPJID jidWithString:[NSString stringWithFormat:@"%@@%@",user,self.serverName]];
        [xmppRoomToInvite editRoomPrivileges:@[[XMPPRoom itemWithAffiliation:@"member" jid:userJid]]];
        [xmppRoomToInvite inviteUser:userJid withMessage:@"Welcome"];

But in openfire, i can see VP@servername was added as a member. 但是在openfire中,我可以看到VP @ servername被添加为成员。 But the users in the member group not receiving new chat room. 但是成员组中的用户没有收到新的聊天室。

There is no such feature in XMPP as default. 默认情况下,XMPP中没有此类功能。 You cannot add a roster group in a MUC room in the MUC specification. 您不能在MUC规范的MUC会议室中添加花名册组。 You should have your client iterate on your roster to add your needed contact from client code. 您应该让您的客户遍历您的名册,以从客户代码中添加所需的联系人。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM