This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Add support for MSC3202: sending one-time key counts and fallback key usage states to Application Services. #11617
Merged
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
eab4a03
Support opting-in to MSC3202 transactional behaviour using the regist…
reivilibre 2c74755
Add type aliases for one-time key counts and unused fallback keys tha…
reivilibre d641b98
Feed one-time key counts and unused fallback keys through the transac…
reivilibre a5d830a
Emit the one-time key counts and fallback keys over federation
reivilibre 873f341
During AS catch-up, send empty OTK counts and fallback keys for now
reivilibre a1d9c34
Boring piping
reivilibre 344649d
Fix up some tests
reivilibre 3761419
Add feature flag for experimental MSC3202 transaction extensions
reivilibre e38a650
Pipe through the feature flag
reivilibre f5b7291
Add some method stubs and add the OTKs and FBKs to the response
reivilibre a105a2f
Find interesting users for the AS when sending OTKs and FBKs
reivilibre e257122
Fix up tests that weren't expecting extra call arguments
reivilibre 053f8ed
Count the OTKs in bulk
reivilibre d3fff94
Get unused fallback key types in bulk and send them out
reivilibre 38495b1
Add a test for sending OTKs and UFBKs to ASes upon receiving PDUs
reivilibre e0fbd84
Newsfile
reivilibre 5a3a5d9
Antilint
reivilibre 9819173
Update synapse/appservice/api.py
reivilibre 853b29b
Remove misleading word 'Lazily'
reivilibre c696a03
Fix TODO comment regarding E2E AS reliability (catch-up)
reivilibre f9ffeb3
Collapse the two functions into one
reivilibre 64febcb
Add comment about why we deliberately add empty lists for zero-unused…
reivilibre a6f7126
Add similar comment about why we deliberately add empty dicts for no …
reivilibre 35b23d3
Merge branch 'develop' into rei/msc3202_otks_fbks
reivilibre f2b2b3a
Fix references to just-removed get_datastore()
reivilibre 712ef2d
Merge branch 'develop' into rei/msc3202_otks_fbks
reivilibre File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Add support for MSC3202: sending one-time key counts and fallback key usage states to Application Services. |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,18 +47,24 @@ def read_config(self, config: JsonDict, **kwargs): | |
# MSC3030 (Jump to date API endpoint) | ||
self.msc3030_enabled: bool = experimental.get("msc3030_enabled", False) | ||
|
||
# The portion of MSC3202 which is related to device masquerading. | ||
self.msc3202_device_masquerading_enabled: bool = experimental.get( | ||
"msc3202_device_masquerading", False | ||
) | ||
|
||
# MSC2409 (this setting only relates to optionally sending to-device messages). | ||
# Presence, typing and read receipt EDUs are already sent to application services that | ||
# have opted in to receive them. If enabled, this adds to-device messages to that list. | ||
self.msc2409_to_device_messages_enabled: bool = experimental.get( | ||
"msc2409_to_device_messages_enabled", False | ||
) | ||
|
||
# The portion of MSC3202 which is related to device masquerading. | ||
self.msc3202_device_masquerading_enabled: bool = experimental.get( | ||
"msc3202_device_masquerading", False | ||
) | ||
|
||
# Portion of MSC3202 related to transaction extensions: | ||
# sending one-time key counts and fallback key usage to application services. | ||
self.msc3202_transaction_extensions: bool = experimental.get( | ||
"msc3202_transaction_extensions", False | ||
) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it worth having both options? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Happy to merge if you think that's best — I wasn't right sure because they're really quite separate features that could easily have been separate MSCs, but not fussed either way. |
||
|
||
# MSC3706 (server-side support for partial state in /send_join responses) | ||
self.msc3706_enabled: bool = experimental.get("msc3706_enabled", False) | ||
|
||
|
Oops, something went wrong.
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.
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.
Having tried to play with this just now, I think this is wrong. The MSC states
device_unused_fallback_key_types