fix: message events not firing after session restoration#3476
Open
IsmailKhCM wants to merge 4 commits intowwebjs:mainfrom
Open
fix: message events not firing after session restoration#3476IsmailKhCM wants to merge 4 commits intowwebjs:mainfrom
IsmailKhCM wants to merge 4 commits intowwebjs:mainfrom
Conversation
This commit adds a reinitializeCryptoStore method to properly reinitialize the crypto store and message handling pipeline after session restoration. This fixes an issue where message events would not fire after closing and reopening the browser with a saved session. Changes:\n- Added reinitializeCryptoStore method to Client class\n- Added TypeScript definitions for the new method\n- Added proper reinitialization of message event handlers\n- Forces immediate decryption attempt for ciphertext messages Testing:\n- Manually tested with session restoration\n- Verified message events fire correctly after browser restart\n- Confirmed both plain text and media messages work
|
Solved my problems over here. Works :D |
|
need this, how i apply this currently? |
I've simply installed using:
|
Collaborator
|
Need to check if this solve the problem of session broken in remote auth |
Collaborator
|
Is this still usefull ? |
its not rare. happen often |
purpshell
approved these changes
Dec 16, 2025
1 task
2 tasks
Member
|
@IsmailKhCM will you update it to comply with the latest changes? Do you know if this fix is still necessary? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR fixes an issue where message events would not fire after closing and reopening the browser with a saved session. The issue was caused by the crypto store and message handling pipeline not being properly reinitialized after session restoration.
Related Issue(s)
Motivation and Context
When using saved sessions (LocalAuth/RemoteAuth), message events would stop working after closing and reopening the browser. This was due to the crypto store and message handling pipeline not being properly reinitialized. This fix ensures that messages continue to be processed correctly after session restoration.
How Has This Been Tested
tests/session_restore.jsEnvironment
Types of changes
Checklist