1
0

Add type aliases for one-time key counts and unused fallback keys that will be sent

This commit is contained in:
Olivier Wilkinson (reivilibre)
2021-12-01 15:00:13 +00:00
parent 72d37f2d8f
commit dcdfa6f46d

View File

@@ -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"