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

Capture decryption errors (PSG-1023) #1673

Merged
merged 7 commits into from
Jan 9, 2023

Conversation

alfogrillo
Copy link
Contributor

@alfogrillo alfogrillo commented Dec 23, 2022

Description

This PR adds a logic to consider events not decrypted inside a PollAggregator.

The final goal is to warn the user when a poll is affected by decryption errors since otherwise the votes count may be different across sessions of the same user or different users in the same room.

Related PR: element-hq/element-ios#7206

@alfogrillo alfogrillo changed the title Capture decryption errors (PSG-1024) Capture decryption errors (PSG-1023) Dec 30, 2022
@@ -52,6 +52,7 @@ public class PollAggregator {

private var events: [MXEvent] = []
private var hasBeenEdited = false
private var relatedErroredEvents: Set<String> = []
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional: Errored does seem to be grammatical, though I find it a bit unusual and almost looks like a typo. Maybe Failed would be better? Alternatively if this only captures decryption errors, it could even be relatedUndecryptableEvents

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it capture just crypto errors.
relatedUndecryptableEvents looks better. ;-)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applied -> 7a29bc6

MatrixSDK/MXSession.m Outdated Show resolved Hide resolved
@alfogrillo alfogrillo merged commit 983ad0f into develop Jan 9, 2023
@alfogrillo alfogrillo deleted the alfogrillo/poll_decryption_message branch January 9, 2023 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants