core: parameter for create address command to configure ratchet keys

This commit is contained in:
Evgeny Poberezkin
2026-07-23 19:49:55 +01:00
parent c97871ffbc
commit 3e355c002c
9 changed files with 25 additions and 49 deletions
@@ -13,10 +13,11 @@ from . import _responses as CR
# Network usage: interactive.
class APICreateMyAddress(TypedDict):
userId: int # int64
pqRatchet: NotRequired[bool]
def APICreateMyAddress_cmd_string(self: APICreateMyAddress) -> str:
return '/_address ' + str(self['userId'])
return '/_address ' + str(self['userId']) + ((' pq_ratchet=' + ('on' if self.get('pqRatchet') else 'off')) if self.get('pqRatchet') is not None else '')
APICreateMyAddress_Response = CR.UserContactLinkCreated | CR.ChatCmdError