mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-08-14 07:10:19 +00:00
bots: document that CreateActiveUser can return a non-active profile
The generated docs still said "Create new user profile." with response "ActiveUser: Active user profile", which is no longer true when keepActiveUser is set. The record generator has no per-field description slot, so the command description is the only place a bot author can learn this.
This commit is contained in:
@@ -2004,7 +2004,7 @@ ChatCmdError: Command error (only used in WebSockets API).
|
||||
|
||||
### CreateActiveUser
|
||||
|
||||
Create new user profile.
|
||||
Create new user profile. The new profile becomes the active one, unless keepActiveUser is set - in that case the current profile stays active. The response carries the created profile either way, so with keepActiveUser it is not the active profile.
|
||||
|
||||
*Network usage*: no.
|
||||
|
||||
|
||||
@@ -178,7 +178,7 @@ chatCommandsDocsData =
|
||||
[ ("ShowActiveUser", [], "Get active user profile.", ["CRActiveUser", "CRChatCmdError"], [], Nothing, "/user"),
|
||||
( "CreateActiveUser",
|
||||
[],
|
||||
"Create new user profile.",
|
||||
"Create new user profile. The new profile becomes the active one, unless keepActiveUser is set - in that case the current profile stays active. The response carries the created profile either way, so with keepActiveUser it is not the active profile.",
|
||||
["CRActiveUser", "CRChatCmdError"],
|
||||
[TD "CEUserExists" "User or contact with this name already exists", TD "CEInvalidDisplayName" "Invalid user display name"],
|
||||
Nothing,
|
||||
|
||||
@@ -744,7 +744,7 @@ export namespace ShowActiveUser {
|
||||
}
|
||||
}
|
||||
|
||||
// Create new user profile.
|
||||
// Create new user profile. The new profile becomes the active one, unless keepActiveUser is set - in that case the current profile stays active. The response carries the created profile either way, so with keepActiveUser it is not the active profile.
|
||||
// Network usage: no.
|
||||
export interface CreateActiveUser {
|
||||
newUser: T.NewUser
|
||||
|
||||
@@ -652,7 +652,7 @@ def ShowActiveUser_cmd_string(self: ShowActiveUser) -> str:
|
||||
ShowActiveUser_Response = CR.ActiveUser | CR.ChatCmdError
|
||||
|
||||
|
||||
# Create new user profile.
|
||||
# Create new user profile. The new profile becomes the active one, unless keepActiveUser is set - in that case the current profile stays active. The response carries the created profile either way, so with keepActiveUser it is not the active profile.
|
||||
# Network usage: no.
|
||||
class CreateActiveUser(TypedDict):
|
||||
newUser: "T.NewUser"
|
||||
|
||||
Reference in New Issue
Block a user