-
Notifications
You must be signed in to change notification settings - Fork 269
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
Session verification incoming request support #4153
Conversation
pub async fn is_verified(&self) -> Result<bool, ClientError> { | ||
let device = | ||
self.encryption.get_own_device().await?.context("Our own device is missing")?; | ||
pub fn set_delegate(&self, delegate: Option<Box<dyn SessionVerificationControllerDelegate>>) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I considered switching away from a delegate and towards a listener but the public api changes are so small that I don't really think it's worth it at this point. Let's reassess when we start thinking about user verification.
Please double check the commit messages, I tried making them fit the new contributing guidelines but not sure I nailed it. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4153 +/- ##
==========================================
+ Coverage 84.85% 84.89% +0.03%
==========================================
Files 269 269
Lines 28916 28902 -14
==========================================
- Hits 24537 24536 -1
+ Misses 4379 4366 -13 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of this look great, thanks for handling this. It is a bit unfinished though.
24e2bb2
to
142d420
Compare
Taking myself off the reviewer list here because it looks like @poljar already has context on it and will do a better job than me anyway |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice. Thanks for taking care of this.
Oh about the commits, some of them you got right some of them not.
The format is documented here: https://www.conventionalcommits.org/en/v1.0.0/. |
…ation requests fixup! feat(ffi): add support for receiving and working with session verification requests
… of direct to_device events.
…lly accepting one - allows handling remote cancellations on verification requests that have not yet been accepted
…ificationRequestState`s
- the tests used to incorrectly wrap the to-device content into an event as if it was sent by alice instead of bob
… the data associated with `VerificationRequestState::Requested`
…y) and (Created, Ready) states
…s instead of fetching it from the store.
40d2c20
to
61b6518
Compare
This PR introduced FFI level API support for interacting with incoming session verification requests. Best reviewed commit by commit
did_receive_verification_request
SessionVerificationController
delegate method that includes information about the incoming request/device/senderacknowledge_verification_request
to get informed about it getting accepted somewhere else or cancelledaccept_verification_request
to start interacting with itThis PR also internally switches to the
VerificationRequest::changes
publisher, fixes a couple of invalid VerificationMachine tests and starts storing requestingDeviceData
directly inVerificationRequestState. Requested
Relates to element-hq/element-meta/issues/2464, fixes #3595.