【问题标题】:Get the roster of a contact (e.g. friends of a friend or friends of a contact in MUC) in xmpp在 xmpp 中获取联系人的名册(例如,朋友的朋友或 MUC 中联系人的朋友)
【发布时间】:2012-05-20 17:09:20
【问题描述】:

是否可以获得联系人的名册(即我的名册联系人的名册或 MUC 中占用者的名册)?

【问题讨论】:

  • 没有。如果默认启用,那将是对隐私的巨大侵犯。您很可能必须编写一个服务器插件,才能做到这一点。

标签: javascript xmpp openfire


【解决方案1】:

如果你可以诱导你的朋友发送他们的名册,你可以使用XEP-0144,“名册物品交换”作为协议:

<message from='horatio@denmark.lit' to='hamlet@denmark.lit'>
  <body>Some visitors, m'lord!</body>
  <x xmlns='http://jabber.org/protocol/rosterx'> 
    <item action='add'
          jid='rosencrantz@denmark.lit'
          name='Rosencrantz'>
      <group>Visitors</group>
    </item>
    <item action='add'
          jid='guildenstern@denmark.lit'
          name='Guildenstern'>
      <group>Visitors</group>
    </item>
  </x>
</message>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-10-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多