mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-09-30 02:18:35 +00:00
core: parameter for create address command to configure ratchet keys
This commit is contained in:
@@ -88,19 +88,20 @@ Create bot address.
|
||||
|
||||
**Parameters**:
|
||||
- userId: int64
|
||||
- pqRatchet: bool?
|
||||
|
||||
**Syntax**:
|
||||
|
||||
```
|
||||
/_address <userId>
|
||||
/_address <userId>[ pq_ratchet=on|off]
|
||||
```
|
||||
|
||||
```javascript
|
||||
'/_address ' + userId // JavaScript
|
||||
'/_address ' + userId + (typeof pqRatchet == 'boolean' ? ' pq_ratchet=' + (pqRatchet ? 'on' : 'off') : '') // JavaScript
|
||||
```
|
||||
|
||||
```python
|
||||
'/_address ' + str(userId) # Python
|
||||
'/_address ' + str(userId) + ((' pq_ratchet=' + ('on' if pqRatchet else 'off')) if pqRatchet is not None else '') # Python
|
||||
```
|
||||
|
||||
**Responses**:
|
||||
|
||||
@@ -77,7 +77,7 @@ chatCommandsDocsData :: [(String, String, [(ConsName, [String], Text, [ConsName]
|
||||
chatCommandsDocsData =
|
||||
[ ( "Address commands",
|
||||
"Bots can use these commands to automatically check and create address when initialized",
|
||||
[ ("APICreateMyAddress", ["server_"], "Create bot address.", ["CRUserContactLinkCreated", "CRChatCmdError"], [], Just UNInteractive, "/_address " <> Param "userId"),
|
||||
[ ("APICreateMyAddress", ["server_"], "Create bot address.", ["CRUserContactLinkCreated", "CRChatCmdError"], [], Just UNInteractive, "/_address " <> Param "userId" <> OnOffParam "pq_ratchet" "pqRatchet" Nothing),
|
||||
("APIDeleteMyAddress", [], "Delete bot address.", ["CRUserContactLinkDeleted", "CRChatCmdError"], [], Just UNBackground, "/_delete_address " <> Param "userId"),
|
||||
("APIShowMyAddress", [], "Get bot address and settings.", ["CRUserContactLink", "CRChatCmdError"], [], Nothing, "/_show_address " <> Param "userId"),
|
||||
("APISetProfileAddress", [], "Add address to bot profile.", ["CRUserProfileUpdated", "CRChatCmdError"], [], Just UNInteractive, "/_profile_address " <> Param "userId" <> " " <> OnOff "enable"),
|
||||
@@ -392,6 +392,7 @@ undocumentedCommands =
|
||||
"APIRejectCall",
|
||||
"APIReorderChatTags",
|
||||
"APIReportMessage",
|
||||
"APIRotateAddressRatchetKeys",
|
||||
"APISaveAppSettings",
|
||||
"APISendCallAnswer",
|
||||
"APISendCallExtraInfo",
|
||||
|
||||
Reference in New Issue
Block a user