添加好友時, set roster是可選的。只發送 type=subscribe的presence即可

 
添加好友時, set roster是可選的。只發送 type=subscribe的presence即可。 set roster 也只是爲了添加暱稱和分組用的
有同事問起,結果忘記了,就又翻閱了一下文檔,如下描述

Implementation Note: Many XMPP clients prompt the user for information about the potential contact (e.g., "handle" and desired roster group) when generating an outbound presence subscription request and therefore send a roster set before sending the outbound presence subscription request. This behavior is OPTIONAL, because a client MAY instead wait until receiving the initial roster push from the server before uploading user-provided information about the contact. A server MUST process a roster set and outbound presence subscription request in either order (i.e., in whatever order generated by the client).

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章