0

我們正在實施使用ejabberd-16.08的聊天基礎架構,並且我們決定使用mod_interact(https://github.com/adamvduke/mod_interact)在收件人用戶離線時向我們的Web服務器發送請求(因此我們可以將它們發送通知)Ejabberd離線和不可用之間的區別

但是,當我將mod_interact與ejaberd集成並向我的名單中的一個脫機朋友發送消息時,我看到mod_interact發送mod_unavailable消息而不是mod_offline消息。 (我希望mod_interact發送mod_offline消息,因爲只有mod_offline具有發送推送通知的正確信息)

所以我想知道在線beeing和beeing不可用的區別是什麼,我們如何設置它。

PS:我想發送的消息(這似乎不可用)的用戶從服務器斷開連接(不specificaly設置他/她面前不可用)

感謝

回答

0

當用戶下線手段他與服務器斷開連接,並且不可用行爲與脫機相同。如果您想自定義存在行爲不可用,則可以。 You can visit here to know more

0

在XMPP中沒有什麼叫離線。 用戶狀態可能是,

unavailable -- Signals that the entity is no longer available for communication. 
subscribe -- The sender wishes to subscribe to the recipient's presence. 
subscribed -- The sender has allowed the recipient to receive their presence. 
unsubscribe -- The sender is unsubscribing from another entity's presence. 
unsubscribed -- The subscription request has been denied or a previously-granted subscription has been cancelled. 
probe -- A request for an entity's current presence; SHOULD be generated only by a server on behalf of a user. 
error -- An error has occurred regarding processing or delivery of a previously-sent presence stanza. 

不可用是指用戶下線。但是,如果在線用戶將自定義狀態設置爲不可用,則您也會收到不可用狀態,但在這種情況下,用戶實際上是在線的。

注意:您可以使用probe來獲取用戶的實際狀態。

+0

這裏的問題是mod_interact並不像預期的那樣工作。當參與者脫機時,它不會發出發布請求。 – tolgatanriverdi