Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: restore JID sooner #996

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

otech47
Copy link

@otech47 otech47 commented Oct 5, 2023

This fixes an edge case I ran into involving logic where the client automatically handles reconnecting and resuming the stream.

I needed a way to listen for a stanza or event that indicates the stream is fully restored and can be used to send messages again (for example to try resending messages that were sent while offline)

the <resumed> stanza received from the server after a <resume> stanza is sent from the client seemed like a good candidate for this, however listening for that event and assuming the JID was available right away was where I was getting buggy behavior.

This change makes sure the JID is restored before sending the <resume> stanza but also nulls it out if that fails for whatever reason

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant