-
Notifications
You must be signed in to change notification settings - Fork 99
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
Hide rooms we don't have the key for in recents list #1902
Conversation
src/e2ee/sharedKeyManagement.ts
Outdated
// We set the Item by only using data from the url. This way we | ||
// make sure, we always have matching pairs in the LocalStorage, | ||
// as they occur in the call links. |
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 must admit that this comment is confusing to read - it implies that there's some data we could use that we avoid using here? But what is that data?
@@ -74,12 +83,14 @@ export const useRoomSharedKey = (roomId: string): string | undefined => { | |||
|
|||
export const useIsRoomE2EE = (roomId: string): boolean | null => { |
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.
Seeing | null
on this return type makes me wonder what we were ever returning null
for, and why we aren't doing that now
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.
Looks like we used to return null if we couldn't find the room: https://github.com/vector-im/element-call/blame/535712d108a3257501457ae24f497dc7d52ed671/src/e2ee/sharedKeyManagement.ts#L76 - unsure why that changed though.
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## livekit #1902 +/- ##
===========================================
- Coverage 30.14% 24.68% -5.47%
===========================================
Files 47 48 +1
Lines 1874 2382 +508
Branches 327 437 +110
===========================================
+ Hits 565 588 +23
- Misses 1264 1743 +479
- Partials 45 51 +6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
This is an annoyingly large change duplicating a lot of the key management stuff into regular non-hooks functions since we can't call a hook in a loop. Feels like there should be a less terrible way of doing this.