【问题标题】:XMPP Subscription Stanza Google TalkXMPP 订阅节 Google Talk
【发布时间】:2013-12-15 19:58:42
【问题描述】:

我正在尝试将订阅节从 a (a@gmail.com) 发送到 b(b@gmail.com),但 Google Talk XMPP 服务器未转发该节(即 b 从未收到它) .

如果我使用 a@gmail.com 登录 Gmail 并邀请 b@gmail.com,b@gmail.com 确实会收到 IQ 节,它看起来像这样:

<presence xmlns='jabber:client' from='a@gmail.com' type='subscribe' to='b@gmail.com'><sub:invitation xmlns:sub='google:subscribe'><sub:body/></sub:invitation></presence>  

[请注意,from 和 to 都只是用户名,而不是指定特定聊天资源(如 a@gmail.com/ABC145D)的完整 JID]

如果我尝试构建一个存在节,就像 b 通过 gmail 收到的那样,我会从 GTalk XMPP 服务器收到一个“错误请求”错误:

If set, the 'from' attribute must be set to the user's full JID.    

但是,如果我尝试 a) 指定完整的“from” JID,b) 将“from”完全从节中删除,或者 c) 为“from”和“to”指定完整的 JID,它们都不起作用. GTalk XMPP 服务器不会将出席信息订阅请求从 a@gmail.com 传输到 b@gmail.com

【问题讨论】:

    标签: python xmpp google-talk


    【解决方案1】:

    我让它与以下形式的节一起工作,并在请求订阅之前将项目添加到花名册(好友列表)

    <presence xmlns='jabber:client' from='a@gmail.com' type='subscribe' to='b@gmail.com'><sub:invitation xmlns:sub='google:subscribe'><sub:body/></sub:invitation></presence> 
    

    【讨论】:

      猜你喜欢
      • 2019-07-26
      • 2018-08-23
      • 2012-09-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-10-08
      • 2011-05-19
      • 1970-01-01
      相关资源
      最近更新 更多