This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
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.
Add support for olm fallback keys #8312
Add support for olm fallback keys #8312
Changes from 9 commits
5aff64e
c8ab469
3188692
aac48e0
411a92b
424989f
ce0d898
22aae13
d3262a6
c8b52f6
f714b3f
88c09bb
c1af945
19df8b6
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Do we need to fix this FIXME before merging?
Should this loop be in a transaction?
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 think that the FIXME is more of a "nice to have" rather than a requirement, so I don't think it needs to be fixed.
Also, I don't think the loop needs to be in a transaction (all the additions are independent), but I can do that if it you think it's a good idea.
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.
There's a constraint on the database for user + device + algorithm. Does that handle this or does this really only expect a single algorithm per user?
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.
It should handle it. It would just do a series of upserts, so would just end up with the last fallback key and dropping all the others. A client shouldn't expect that the server would store all the keys if it gives multiple keys per algorithm, so this seems like a reasonable result if we don't throw an error.
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.
So this fixme is really an optimization?