We're updating the issue view to help you get more done. 

Openfire doesn't ACK the sent presence stanza to the user

Description

When sending presences the server must send back the presence to the JID, see https://tools.ietf.org/html/rfc6121#section-4.2.2.

Most of the servers are also keeping the initial ID (like M-Link, ejabberd, Prosody) then the client can handle properly the response.

 

Environment

None

Acceptance Test - Entry

None

Activity

Show:
Guus der Kinderen
June 29, 2018, 11:50 AM

I don't think the fix for ever completely worked. It is based on a presence broadcast that sends a presence update to all subscribed entities, as well as all resources of the same user that are available.

The problem lies in the fact that the presence update was 'recorded' in the client session only after this broadcast was done. When iterating over all client session to find resources that are available, the session from where the update originated, is still reporting the previous presence state (in case of a new session: unavailable).

To me, re-ordering events seem logical, and desirable for other reasons. It makes sense to first store the presence update in the client session, and only then broadcast the update.

With this fix, the test mentioned above now produces:

 

Zash
October 30, 2018, 7:49 PM

I can reproduce this running openfire_2018-10-30.tar.gz by:

Connect
Send <presence/>
Expect <presence/> but don't receive it

A second presence stanza is received.

test case for the scansion test runner

Daryl Herzmann
October 30, 2018, 8:06 PM

Thanks, but what do you mean by 'A second presence stanza is received.' ?

Zash
October 30, 2018, 8:26 PM

I mean (from the clients perspective), this is what I observed:

Connect
Send <presence/>
Receive nothing
Send <presence/>
Receive <presence/>

Guus der Kinderen
August 29, 2019, 12:07 PM

The fix that was applied earlier improved the reflection of initial presence, but introduced the original problem when reflecting offline presence.

This is being logged on debug:

Fixed

Assignee

Guus der Kinderen

Reporter

Timothée Jaussoin

Labels

None

Expected Effort

None

Ignite Forum URL

None

Fix versions

Affects versions

Priority

Major
Configure