使用 XMPPHP 的聊天邀请

发布于 2024-08-27 18:33:27 字数 142 浏览 3 评论 0原文

是否可以使用 XMPPHP 发送聊天邀请?

我已成功从 CMS 设置消息系统,但我正在寻找一种在发送第一条消息之前发送聊天请求的方法。

在 XMPPHP 中可以做到这一点吗?我问这个是因为我找不到该课程的任何适当的文档。感谢您的任何意见。

Is it possible to send chat invitations using XMPPHP?

I have successfully setup the messaging system from a CMS, but I am looking for a way to send chat request before the first message is sent.

Is it possible to do that in XMPPHP? I am asking this because I could not find any proper documentation for the class. Thank you for any input.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

等往事风中吹 2024-09-03 18:33:27

您可以使用下面的内容发送聊天邀请。

$conn->subscribe('$jid');

您可以从

$conn->unsubscribe('$jid');

您的联系人列表中删除 jid

you can use below for send chat invitation.

$conn->subscribe('$jid');

by

$conn->unsubscribe('$jid');

you can remove jid from your contact list

别念他 2024-09-03 18:33:27

通常在 XMPP 中,我们不会先发送请求,而只发送第一条消息。如果您必须具有此功能,则需要来自 XEP-155 的协议(节会话协商)。您可能需要自己实现此协议,并处理另一端的客户端未实现该协议的情况......主要是因为没有人实现此协议。 :)

Typically in XMPP, we don't send a request first, we just send the first message. If you MUST have this feature, you'll want the protocol from XEP-155 (Stanza Session Negotiation). You'll likely need to implement this protocol yourself, and also deal with the case where the client on the other side doesn't implement the protocol... mostly because NOBODY has implemented this. :)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文