使用 xmpppy 连接 Jabber 服务器并进行身份验证后,在哪里可以找到完整的 JID 值图书馆?
我需要完整的 JID 才能对服务器进行后续 Iq
调用。指定裸 JID (user@domain.com) 会导致以下错误:
If set, the 'from' attribute must be set to the user's full JID
我已阅读 online API并查看了一些源代码,但仍然找不到它。
完整的 JID 如下所示:user@domain.com/resource
最佳答案
使用非下划线版本:
c = xmpp.client.Client(...)
# connect
jid = xmpp.JID(node=c.User, domain=c.Server, resource=c.Resource)
但是,无需设置发件人地址。服务器将为您发送的所有节执行此操作。
关于python - 使用xmpppy时完整的JID值在哪里?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2393011/