问题描述
在 xmpp 中,以下 2 个用户可以加入多用户聊天 (MUC) 或订阅同一个 pub-sub 节点?
In xmpp, following 2 users could join multi-user chat(MUC) or subscribe to same pub-sub node?
[email protected]/[email protected]/user2
[email protected]/[email protected]/user2
推荐答案
当加入匿名 MUC 房间时,其他人不知道房间中其他人的真实"JID 的房间,连接用户提供自己的 JID.
When joining an anonymous MUC room, a room where others do not know the "real" JID of others in the room, the connecting user provides their own JID.
当加入非匿名房间时,用户提供他们的完整 JID,然后将其传输给所有住户.
When joining a non-anonymous room the users provide their full JID which is transmitted then to all occupants.
无论哪种情况,都不会阻止用户使用相同的裸 JID 但使用不同的资源加入.更多关于 MUC 协议的细节,特别是关于加入房间的细节可以在 XEP-0045:基本 MUC 协议.
In either case there is nothing to prevent the user from joining with the same bare JID but different resources. More details on the MUC protocol, specifically around joining a room can be found in XEP-0045: Basic MUC Protocol.
当通过 pub-sub 订阅时,客户端可以在订阅时提供完整的 JID 或裸 JID(无资源).有关详细信息,请参阅发布订阅 XEP,XEP-0060
When subscribing via pub-sub the client can provide either a full JID or a bare JID (no resource) when subscribing. Details for this can be found in the pub-sub XEP, XEP-0060
这篇关于是否有可能只有不同资源的 JID 加入同一个多用户聊天室的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!