How to detect if a user is active whether his presence is offline - online

i developed a plugin that intercept chat packets.

the packet is sent only when the user is online.

what i want to do is route the packets also to the users that are displayed in the session summary page with an offline presence.

the question is how to differentiate between users that are showed in session summary with offline presence and those that are completely disconnected?

when I use the PresenceManager.getPresence(user1110) the return value is null same when the user is completely disconnected and not displayed in the session summary.

i would really appreciate your help.