我们可以延迟响应 XMPP 在线状态订阅吗?

发布于 2024-07-19 05:51:45 字数 568 浏览 3 评论 0原文

我正在使用 PacketListener 接收 XMPP 数据包。

如果我收到以下信息:

<presence from="[email protected]" to="[email protected]" type="subscribe"/>

XMPP 服务器是否期望我立即响应?

  • 动机:我想缓存所有这些订阅请求,并允许收件人有选择地接受/拒绝(类似于 Facebook 邀请)。
  • 是否有一个 API 可以让我从 openfire 请求所有订阅请求?

I am using a PacketListener to receive XMPP packets.

If I receive the following:

<presence from="[email protected]" to="[email protected]" type="subscribe"/>

is the XMPP server expecting me to respond immediately ?

  • Motivation: I want to cache all these subscription requests and allow the recipient to selectively ACCEPT/DENY (à la facebook invitations).
  • Is there an API in which I can request for all subscription requests from openfire ?

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

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

发布评论

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

评论(1

生寂 2024-07-26 05:51:45

您不需要立即回复,甚至不需要在特定会话中回复; 服务器存储您有待处理的入站订阅的事实,并会在您每次登录时重新通知您待处理的订阅。因此,也不需要请求该列表。

You do NOT need to reply immediately or even in a given session; the server stores the fact that you have a pending inbound subscription, and will re-inform you of the pending subscription every time you log in. Therefore, there should be no need to request the list either.

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