Bladeren bron

MSC3202: Fix device_unused_fallback_keys -> device_unused_fallback_key_types (#12520)

* Fix device_unused_fallback_keys -> device_unused_fallback_key_types

* changelog
Will Hunt 2 jaren geleden
bovenliggende
commit
b82fff66df
3 gewijzigde bestanden met toevoegingen van 3 en 2 verwijderingen
  1. 1 0
      changelog.d/12520.bugfix
  2. 1 1
      synapse/appservice/__init__.py
  3. 1 1
      synapse/appservice/api.py

+ 1 - 0
changelog.d/12520.bugfix

@@ -0,0 +1 @@
+Fix a bug in the implementation of MSC3202 where Synapse would use the field name `device_unused_fallback_keys`, rather than `device_unused_fallback_key_types`.

+ 1 - 1
synapse/appservice/__init__.py

@@ -42,7 +42,7 @@ logger = logging.getLogger(__name__)
 #   user ID -> {device ID -> {algorithm -> count}}
 TransactionOneTimeKeyCounts = Dict[str, Dict[str, Dict[str, int]]]
 
-# Type for the `device_unused_fallback_keys` field in an appservice transaction
+# Type for the `device_unused_fallback_key_types` field in an appservice transaction
 #   user ID -> {device ID -> [algorithm]}
 TransactionUnusedFallbackKeys = Dict[str, Dict[str, List[str]]]
 

+ 1 - 1
synapse/appservice/api.py

@@ -278,7 +278,7 @@ class ApplicationServiceApi(SimpleHttpClient):
                 ] = one_time_key_counts
             if unused_fallback_keys:
                 body[
-                    "org.matrix.msc3202.device_unused_fallback_keys"
+                    "org.matrix.msc3202.device_unused_fallback_key_types"
                 ] = unused_fallback_keys
             if device_list_summary:
                 body["org.matrix.msc3202.device_lists"] = {