使用xmpppy时完整的JID值在哪里?
使用 xmpppy 库连接 Jabber 服务器并进行身份验证后,在哪里可以找到完整的 JID 值?
我需要完整的 JID 才能对服务器进行后续的 Iq
调用。指定裸 JID ([email protected]) 会导致以下错误:
如果设置,“from”属性必须设置为用户的完整 JID
完整的 JID 如下所示:[email protected]/resource
Where do I find the full JID value after connecting and authenticating against a Jabber server when using the xmpppy library?
I need the full JID for a subsequent Iq
call to the server. Specifying the bare JID ([email protected]) results in the following error:
If set, the 'from' attribute must be set to the user's full JID
I have read through the online API and looked at some of the source code but still cannot find it.
The full JID looks like this: [email protected]/resource
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用非下划线版本:
但是,无需设置发件人地址。服务器将为您发送的所有节执行此操作。
Use the non-underbar versions:
However, there is no need to set a from address. The server will do this for you for all of the stanzas you send.
我也没有看到 JID 被这样存储,但是在 auth's sources,第 213 行,我看到
其中
self
是我们正在验证的Client
实例;所以也许你可以恢复这些信息并为自己构建一个 JID 从那个?I don't see the JID being stored as such either, but in auth's sources, line 213, I see
where
self
is the instance ofClient
we're authenticating; so maybe you could just recover this info and build yourself a JID from that?