-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Description
I noticed a case where a new device does not show on other clients. I found this on Psi+ 1.4.554 with OMEMO Plugin v0.0.1.
When you log in for the first time, with the OMEMO Plugin enabled, Psi+ publishes the new device to the devicelist before publishing the device's bundle.
This starts a race condition with the other client. If the other client queries the bundle for that device ID first, then it gets item-not-found
back and the new device doesn't show on the other client.
Do you think it is feasible to publish the bundle before publishing the new device to the devicelist?
I'm happy to work on a PR for this if needed.
cc: @stigger - rion suggested I mention this to you
Scenario
Psi+ publishes the new device ID 63303797
Jul 28 09:03:49 c2s56499afb0610 debug RECV: <iq xml:lang='en' id='aac5a' type='set'><pubsub xmlns='http://jabber.org/protocol/pubsub'><publish node='eu.siacs.conversations.axolotl.devicelist'>
<item>
<list xmlns='eu.siacs.conversations.axolotl'>
<device id='498942155'/>
<device id='621016301'/>
<device id='568763013'/>
<device id='63303797'/>
</list>
</item>
</publish>
</pubsub></iq>
This new device gets forwarded to Monal
Jul 28 09:03:50 c2s56499b03f3e0 debug SEND: <message to='user1@continuous.nonprod.koyo.haus/Monal-iOS.5d964763' id='YcNe8jQoR71C9Fe7Lx3KDnga' from='user2@continuous.nonprod.koyo.haus' type='headline'><event xmlns='http://jabber.org/protocol/pubsub#event'><items node='eu.siacs.conversations.axolotl.devicelist'><item id='abd44f5e-7b99-4ee9-a72e-29f0f25269c5' publisher='user2@continuous.nonprod.koyo.haus'>
<list xmlns='eu.siacs.conversations.axolotl'>
<device id='498942155'/>
<device id='621016301'/>
<device id='568763013'/>
<device id='63303797'/>
</list>
</item></items></event></message>
Monal requests the bundle for this new device
Jul 28 09:03:50 c2s56499b5c7e00 debug RECV: <iq xml:lang='en' type='get' id='B0E1D4E3-ED32-4B7D-8ABB-D72B640AF2D5' to='user2@continuous.nonprod.koyo.haus'><pubsub xmlns='http://jabber.org/protocol/pubsub'><items node='eu.siacs.conversations.axolotl.bundles:63303797'/></pubsub></iq>
Prosody returns item-not-found as the bundle hasn't been published yet
Jul 28 09:03:50 c2s56499b5c7e00 debug SEND: <iq type='error' id='B0E1D4E3-ED32-4B7D-8ABB-D72B640AF2D5' to='user1@continuous.nonprod.koyo.haus/Monal-iOS.85f7311a' from='user2@continuous.nonprod.koyo.haus'><error type='cancel'><item-not-found xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/></error></iq>
Psi+ publishes the bundle
Jul 28 09:03:50 c2s56499afb0610 debug RECV: <iq xml:lang='en' id='aac6a' type='set'><pubsub xmlns='http://jabber.org/protocol/pubsub'><publish node='eu.siacs.conversations.axolotl.bundles:63303797'>
<item>
<bundle xmlns='eu.siacs.conversations.axolotl'>
...
</bundle>
</item>
</publish>
</pubsub></iq>
Metadata
Metadata
Assignees
Labels
No labels