summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorOlivier Wilkinson (reivilibre) <oliverw@matrix.org>2021-12-01 15:00:13 +0000
committerOlivier Wilkinson (reivilibre) <oliverw@matrix.org>2021-12-10 13:48:56 +0000
commitdcdfa6f46d4c2ebc2075547899bf22b91b841e82 (patch)
treef6411a4bdf6198345c7dd516c7e1a979dd4c41df /synapse
parentSupport opting-in to MSC3202 transactional behaviour using the registration file (diff)
downloadsynapse-dcdfa6f46d4c2ebc2075547899bf22b91b841e82.tar.xz
Add type aliases for one-time key counts and unused fallback keys that will be sent
Diffstat (limited to 'synapse')
-rw-r--r--synapse/appservice/__init__.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/synapse/appservice/__init__.py b/synapse/appservice/__init__.py
index 9672e34f92..811f21d634 100644
--- a/synapse/appservice/__init__.py
+++ b/synapse/appservice/__init__.py
@@ -27,6 +27,14 @@ if TYPE_CHECKING:
 
 logger = logging.getLogger(__name__)
 
+# Type for the `device_one_time_key_counts` field in an appservice transaction
+#   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
+#   user ID -> {device ID -> [algorithm]}
+TransactionUnusedFallbackKeys = Dict[str, Dict[str, List[str]]]
+
 
 class ApplicationServiceState(Enum):
     DOWN = "down"