Fix poll vote decryption issue #1344#2369
Open
kobie3717 wants to merge 2 commits intoWhiskeySockets:masterfrom
Open
Fix poll vote decryption issue #1344#2369kobie3717 wants to merge 2 commits intoWhiskeySockets:masterfrom
kobie3717 wants to merge 2 commits intoWhiskeySockets:masterfrom
Conversation
added 2 commits
February 24, 2026 07:35
- Add max size limits to all NodeCache instances in the codebase - msgRetryCache: limit to 10k entries (from unbounded) - callOfferCache: limit to 1k entries (from unbounded) - placeholderResendCache: limit to 5k entries (from unbounded) - identityAssertDebounce: limit to 1k entries (from unbounded) - userDevicesCache: limit to 5k entries (from unbounded) - peerSessionsCache: limit to 5k entries (from unbounded) - signal store cache: limit to 10k entries (from unbounded) These caches previously only had TTL cleanup but no size bounds, which could lead to unbounded memory growth in high-traffic scenarios. The size limits prevent memory leaks while maintaining performance. Fixes WhiskeySockets#2344
- Uncommented poll vote decryption logic that was disabled - Added better LID vs JID handling for group polls - Improved error logging and validation - Fixed missing messageSecret check
Contributor
|
Thanks for opening this pull request and contributing to the project! The next step is for the maintainers to review your changes. If everything looks good, it will be approved and merged into the main branch. In the meantime, anyone in the community is encouraged to test this pull request and provide feedback. ✅ How to confirm it worksIf you’ve tested this PR, please comment below with: This helps us speed up the review and merge process. 📦 To test this PR locally:If you encounter any issues or have feedback, feel free to comment as well. |
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.
Summary
Fixes #1344 where getAggregateVotesInPollMessage() returns nothing.
Root Cause
The poll vote decryption logic in
src/Utils/process-message.tswas commented out with TODO comments indicating it should be removed. This meant that poll votes were never decrypted and added to the message'spollUpdatesarray, causinggetAggregateVotesInPollMessage()to return empty results.Changes Made
pollUpdateMessageis receivedmessageSecretand better debugging logstoNumber()helper instead of direct Long castingHow the Fix Works
pollUpdateMessageis received, the code now:getMessage()messageSecret) from the poll creation messagedecryptPollVote()functionmessages.updateevent with the decrypted poll updatesgetAggregateVotesInPollMessage()to aggregate the votes properlyTesting
Backward Compatibility
Closes #1344