Project

General

Profile

Bug #4291

ContactChangedPresenceEvent has show "online" for unavailable presence

Added by Wojciech Kapcia TigaseTeam over 2 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Target version:
-
Start date:
2016-06-30
Due date:
2016-07-08
% Done:

100%

Estimated time:
Source Code Disclaimer:

Description

With following code responsible for handling @ContactChangedPresenceEvent@:

final Jaxmpp contact = new Jaxmpp()

contact.getEventBus().addHandler(PresenceModule.ContactChangedPresenceHandler.ContactChangedPresenceEvent.class, new PresenceModule.ContactChangedPresenceHandler() {
    @Override
    void onContactChangedPresence(SessionObject sessionObject, Presence stanza, JID jid, Presence.Show show, String status, Integer priority) throws JaxmppException {
        System.out.println("Presence received:\t" + jid + " is now " + show + " (" + status + ")");

    }
});

unavailable contact has Show as online instead of offline:

2016-06-30_13:01:04 FINEST     PresenceModule.process()                 Presence received from tigase2@atlantiscity/Psi+ :: <presence from="tigase2@atlantiscity/Psi+" xmlns="jabber:client" to="admin@atlantiscity">
<priority>55</priority><c node="http://psi-dev.googlecode.com/caps" xmlns="http://jabber.org/protocol/caps" ext="e-time ep-notify-2 last-act sxe whiteboard" ver="0.16"/></presence> 
2016-06-30_13:01:04 FINER      PresenceModule.process()                 Presence online from tigase2@atlantiscity/Psi+ 
Presence received:  tigase2@atlantiscity/Psi+ is now online (null)



2016-06-30_13:01:08 FINEST     PresenceModule.process()                 Presence received from tigase2@atlantiscity/Psi+ :: <presence type="unavailable" xmlns="jabber:client" to="admin@atlantiscity" from="tigase2@atlantiscity/Psi+">
<status>Logged out</status></presence> 
2016-06-30_13:01:08 FINER      PresenceModule.process()                 Presence offline from tigase2@atlantiscity/Psi+ 
Presence received:  tigase2@atlantiscity/Psi+ is now online (Logged out)

Presence seems to be correctly derived from stanza in PresenceModule.process() but incorrect in the event (vide last two lines above)


Related issues

Blocked by Tigase JaXMPP Client Library - Bug #4319: tigase-jaxmpp2 - Build # 1403 - Failure!Closed2016-07-052016-07-08

Associated revisions

Revision a4bffb1a (diff)
Added by Bartosz Malkowski TigaseTeam over 2 years ago

#4291: ContactChangedPresenceEvent has show "online" for unavailable presence

History

#1 Avatar?id=6098&size=24x24 Updated by Bartosz Malkowski TigaseTeam over 2 years ago

  • Status changed from New to Resolved
  • Assignee changed from Bartosz Malkowski to Wojciech Kapcia
  • % Done changed from 0 to 100

Added @tigase.jaxmpp.core.client.xmpp.stanzas.Presence.Show#offline@.

#2 Updated by Wojciech Kapcia TigaseTeam over 2 years ago

  • Blocked by Bug #4319: tigase-jaxmpp2 - Build # 1403 - Failure! added

#3 Updated by Wojciech Kapcia TigaseTeam over 2 years ago

  • Status changed from Resolved to In QA

Works as expected now:

Presence received:  tigase1@atlantiscity/Psi+/1 is now online (null)
Presence received:  tigase1@atlantiscity/Psi+/1 is now offline (Logged out)

#4 Updated by Wojciech Kapcia TigaseTeam over 2 years ago

  • Status changed from In QA to Closed

It wasn't possible to Close from Resolved…

Also available in: Atom PDF