sub  ask  recv

订阅 询问 接受

含义

substatus

-1—  应该删除这个好友

         Indicates that the roster item should be removed.

0—  没有建立好友关系

        No subscription is established.

1—  用户已经发出好友请求

        The roster owner has a subscription to the roster item’s presence.

2—  收到好友请求并且加对方好友

       The roster item has a subscription to the roster owner’s presence.

3—  好友已经相互添加

       The roster item and the owner have a mutual subscription.

字段的具体分析:

askstatus

-1—  没有挂起的添加好友请求。

     The roster item has no pending subscription requests.

 0— 有挂起的添加好友请求。

     The roster item has been asked for permission to subscribe to its presence but no response has been received.

1— 估计是有没有回复的删除请求吧

      The roster owner has asked the roster item to be unsubscribed from its presence notifications but hasn't yet received confi rmation.

recvstatus

-1— 已经回复添加好友请求

       There are no subscriptions that have been received but not presented to the user.

1— 接收到好友请求但是没有给好友回复

       The server has received a subscribe request, but has not forwarded it to the user.

2— 估计是没有回复删除请求吧

      The server has received an unsubscribe request, but has not forwarded it to the user.

sub订阅:

-1  remove  发送删除用户请求

0    none     用户没有建立好友关系

1    to          发送订阅请求且请求被接受

2    from      接受好友订阅请求

3    both      双方互为好友关系

ask是否有发送订阅请求:

-1    null      没有发送好友请求

0    subscribe  发送好友订阅请求但没回复

1    unsubscribe  发送取消订阅好友请求

rec是否有接受订阅请求:

-1    null      没有收到好友订阅请求

1     sub      收到好友订阅请求但没回复

2    unsub   收到好友取消订阅请求

对方拒绝好友请求 不变 0 0 -1

对方接受好友请求 1 -1 1。

对方接受后会发好友请求  同意则 3 -1  -1

收到好友申请  0 -1  1

如果 拒绝添加,则删除数据库记录

如果 接受添加,2 0 -1 。接受同时会发送好友添加请求,3  -1 -1

1申请 加2好友(2在线状态)

1 2@xxx    0 0 -1

2 1@xxx    0 -1 1

2 接受

1 2@xxx    1 -1 1

2 1@xxx    2 0 -1

2申请加1好友

1同意

1 2@xxx    3 -1 -1

2 1@xxx    3 -1 -1

1申请 加2好友(2未登录)

1 2@xxx    0 0 -1

2 1@xxx    0 -1 1

2登录

1 2@xxx    1 -1 -1

2 1@xxx    2 -1 -1

2 接受

1 2@xxx    3 -1 -1

2 1@xxx    3 -1 -1

JID:

一个XMPP实体的地址称为Jabber Identifier或JID,作用类似于IP地址。一个合法的JID包括节点名,域名资源名,其格式为:jid=[node'@']domain['/'resource]

XMPP协议的命名空间:

jabber:iq:private -- 私有数据存储,用于本地用户私人设置信息,比如用户备注等。

jabber:iq:conference -- 一般会议,用于多个用户之间的信息共享

jabber:x:encrypted -- 加密的消息,用于发送加密消息

jabber:x:expire -- 消息终止

jabber:iq:time -- 客户端时间

jabber:iq:auth -- 简单用户认证,一般用于服务器之间或者服务器和客户端之间的认证

jabber:x:roster -- 内部花名册

jabber:x:signed -- 标记的在线状态

jabber:iq:search -- 用户数据库查询,用于向服务器发送查询请求

jabber:iq:register -- 注册请求,用于用户注册相关信息

jabber:x:iq:roster -- 花名册管理

jabber:x:conference -- 会议邀请,用于向参加会议用户发送开会通知

jabber:x:event -- 消息事件

vcard-temp -- 临时的vCard,用于设置用户的头像以及昵称等

最新文章

  1. pyspider爬豆瓣电影实例
  2. 设计模式 之 策略(Strategy)模式
  3. Linux laptop-mode 电池供电时鼠标间歇失灵问题解决
  4. xml解析模块
  5. cas单点登录 SSO 的实现原理
  6. js取当前项目名称
  7. maven之一——多模块项目构建
  8. Linux Qt动态库的创建和使用
  9. 刘汝佳 算法竞赛-入门经典 第二部分 算法篇 第五章 3(Sorting/Searching)
  10. AI中去掉页面边框
  11. 验证中文、英文、电话、手机、邮箱、数字、数字和字母、Url地址和Ip地址的正则表达式
  12. 动态加载JS代码
  13. C#(SuperWebSocket)与websocket通信
  14. Java自己动手写连接池一
  15. asp.net core 系列 17 通用主机 IHostBuilder
  16. BZOJ1058或洛谷1110 [ZJOI2007]报表统计
  17. 类似于placehoder效果的图标展示
  18. POJ 2240 - Arbitrage - [bellman-ford求最短路]
  19. 连接数据库-corina
  20. [转载]查询json数据结构的8种方式

热门文章

  1. Linux就该这么学07学习笔记
  2. vue,一路走来(5)--微信登录
  3. Sass--混合宏的不足
  4. <select multiple="multiple"> 数据回显
  5. 为什么要用unittest
  6. [BZOJ3626] [LNOI2014] LCA 离线 树链剖分
  7. Django学习——collectstatic错误
  8. VueJS基础框架代码介绍
  9. 测试单点登录xml配置
  10. Codeforces 837D--Round Subset (DP)