How to retrive user status (online/offline) in process method.
I'd like to find that the specific user "B" is offline or online in
process method from the
session variable. The problem is when user A tries to send a message to the user B, if the user B is not online, each stanza goes through the Session Manager component just one time. So, How can I find out the user B is offline in my plugin ,without database query, just by the process of message in Session Manager?
Added by Ehsan Mozaffari over 2 years ago
Thank you for your rapid answer.
null message goes through session manager twice and the
to parameter appears, one time with full JID and one time with bare JID. why this happens? and what is the difference between the first time and the second time?
Added by Andrzej Wójcik over 2 years ago
Message is processed twice as Tigase processes it twice - once as message sent to full jid, but as this full jid is not available it processes it seconds time as message sent to bare jid. This is done due to fact that Tigase uses XMPP message processing as defined in RFC 6121: Section 184.108.40.206.1
It is possible to change processing and return error if recipient to which message is sent to full jid is not avilable by changing