mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-08-29 01:09:15 +00:00
Merge branch 'master' into ep/smp-server-pages
This commit is contained in:
+223
-53
@@ -50,6 +50,9 @@ This file is generated automatically.
|
||||
- [APIListContacts](#apilistcontacts)
|
||||
- [APIListGroups](#apilistgroups)
|
||||
- [APIDeleteChat](#apideletechat)
|
||||
- [APISetGroupCustomData](#apisetgroupcustomdata)
|
||||
- [APISetContactCustomData](#apisetcontactcustomdata)
|
||||
- [APISetUserAutoAcceptMemberContacts](#apisetuserautoacceptmembercontacts)
|
||||
|
||||
[User profile commands](#user-profile-commands)
|
||||
- [ShowActiveUser](#showactiveuser)
|
||||
@@ -60,6 +63,10 @@ This file is generated automatically.
|
||||
- [APIUpdateProfile](#apiupdateprofile)
|
||||
- [APISetContactPrefs](#apisetcontactprefs)
|
||||
|
||||
[Chat management](#chat-management)
|
||||
- [StartChat](#startchat)
|
||||
- [APIStopChat](#apistopchat)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -98,7 +105,7 @@ UserContactLinkCreated: User contact address created.
|
||||
- user: [User](./TYPES.md#user)
|
||||
- connLinkContact: [CreatedConnLink](./TYPES.md#createdconnlink)
|
||||
|
||||
ChatCmdError: Command error.
|
||||
ChatCmdError: Command error (only used in WebSockets API).
|
||||
- type: "chatCmdError"
|
||||
- chatError: [ChatError](./TYPES.md#chaterror)
|
||||
|
||||
@@ -134,7 +141,7 @@ UserContactLinkDeleted: User contact address deleted.
|
||||
- type: "userContactLinkDeleted"
|
||||
- user: [User](./TYPES.md#user)
|
||||
|
||||
ChatCmdError: Command error.
|
||||
ChatCmdError: Command error (only used in WebSockets API).
|
||||
- type: "chatCmdError"
|
||||
- chatError: [ChatError](./TYPES.md#chaterror)
|
||||
|
||||
@@ -171,7 +178,7 @@ UserContactLink: User contact address.
|
||||
- user: [User](./TYPES.md#user)
|
||||
- contactLink: [UserContactLink](./TYPES.md#usercontactlink)
|
||||
|
||||
ChatCmdError: Command error.
|
||||
ChatCmdError: Command error (only used in WebSockets API).
|
||||
- type: "chatCmdError"
|
||||
- chatError: [ChatError](./TYPES.md#chaterror)
|
||||
|
||||
@@ -211,7 +218,7 @@ UserProfileUpdated: User profile updated.
|
||||
- toProfile: [Profile](./TYPES.md#profile)
|
||||
- updateSummary: [UserProfileUpdateSummary](./TYPES.md#userprofileupdatesummary)
|
||||
|
||||
ChatCmdError: Command error.
|
||||
ChatCmdError: Command error (only used in WebSockets API).
|
||||
- type: "chatCmdError"
|
||||
- chatError: [ChatError](./TYPES.md#chaterror)
|
||||
|
||||
@@ -249,7 +256,7 @@ UserContactLinkUpdated: User contact address updated.
|
||||
- user: [User](./TYPES.md#user)
|
||||
- contactLink: [UserContactLink](./TYPES.md#usercontactlink)
|
||||
|
||||
ChatCmdError: Command error.
|
||||
ChatCmdError: Command error (only used in WebSockets API).
|
||||
- type: "chatCmdError"
|
||||
- chatError: [ChatError](./TYPES.md#chaterror)
|
||||
|
||||
@@ -280,7 +287,7 @@ Send messages.
|
||||
```
|
||||
|
||||
```javascript
|
||||
'/_send ' + sendRef.toString() + (liveMessage ? ' live=on' : '') + (ttl ? ' ttl=' + ttl : '') + ' json ' + JSON.stringify(composedMessages) // JavaScript
|
||||
'/_send ' + ChatRef.cmdString(sendRef) + (liveMessage ? ' live=on' : '') + (ttl ? ' ttl=' + ttl : '') + ' json ' + JSON.stringify(composedMessages) // JavaScript
|
||||
```
|
||||
|
||||
```python
|
||||
@@ -294,7 +301,7 @@ NewChatItems: New messages.
|
||||
- user: [User](./TYPES.md#user)
|
||||
- chatItems: [[AChatItem](./TYPES.md#achatitem)]
|
||||
|
||||
ChatCmdError: Command error.
|
||||
ChatCmdError: Command error (only used in WebSockets API).
|
||||
- type: "chatCmdError"
|
||||
- chatError: [ChatError](./TYPES.md#chaterror)
|
||||
|
||||
@@ -320,7 +327,7 @@ Update message.
|
||||
```
|
||||
|
||||
```javascript
|
||||
'/_update item ' + chatRef.toString() + ' ' + chatItemId + (liveMessage ? ' live=on' : '') + ' json ' + JSON.stringify(updatedMessage) // JavaScript
|
||||
'/_update item ' + ChatRef.cmdString(chatRef) + ' ' + chatItemId + (liveMessage ? ' live=on' : '') + ' json ' + JSON.stringify(updatedMessage) // JavaScript
|
||||
```
|
||||
|
||||
```python
|
||||
@@ -339,7 +346,7 @@ ChatItemNotChanged: Message not changed.
|
||||
- user: [User](./TYPES.md#user)
|
||||
- chatItem: [AChatItem](./TYPES.md#achatitem)
|
||||
|
||||
ChatCmdError: Command error.
|
||||
ChatCmdError: Command error (only used in WebSockets API).
|
||||
- type: "chatCmdError"
|
||||
- chatError: [ChatError](./TYPES.md#chaterror)
|
||||
|
||||
@@ -367,7 +374,7 @@ Delete message.
|
||||
```
|
||||
|
||||
```javascript
|
||||
'/_delete item ' + chatRef.toString() + ' ' + chatItemIds.join(',') + ' ' + deleteMode // JavaScript
|
||||
'/_delete item ' + ChatRef.cmdString(chatRef) + ' ' + chatItemIds.join(',') + ' ' + deleteMode // JavaScript
|
||||
```
|
||||
|
||||
```python
|
||||
@@ -383,7 +390,7 @@ ChatItemsDeleted: Messages deleted.
|
||||
- byUser: bool
|
||||
- timed: bool
|
||||
|
||||
ChatCmdError: Command error.
|
||||
ChatCmdError: Command error (only used in WebSockets API).
|
||||
- type: "chatCmdError"
|
||||
- chatError: [ChatError](./TYPES.md#chaterror)
|
||||
|
||||
@@ -423,7 +430,7 @@ ChatItemsDeleted: Messages deleted.
|
||||
- byUser: bool
|
||||
- timed: bool
|
||||
|
||||
ChatCmdError: Command error.
|
||||
ChatCmdError: Command error (only used in WebSockets API).
|
||||
- type: "chatCmdError"
|
||||
- chatError: [ChatError](./TYPES.md#chaterror)
|
||||
|
||||
@@ -449,7 +456,7 @@ Add/remove message reaction.
|
||||
```
|
||||
|
||||
```javascript
|
||||
'/_reaction ' + chatRef.toString() + ' ' + chatItemId + ' ' + (add ? 'on' : 'off') + ' ' + JSON.stringify(reaction) // JavaScript
|
||||
'/_reaction ' + ChatRef.cmdString(chatRef) + ' ' + chatItemId + ' ' + (add ? 'on' : 'off') + ' ' + JSON.stringify(reaction) // JavaScript
|
||||
```
|
||||
|
||||
```python
|
||||
@@ -464,7 +471,7 @@ ChatItemReaction: Message reaction.
|
||||
- added: bool
|
||||
- reaction: [ACIReaction](./TYPES.md#acireaction)
|
||||
|
||||
ChatCmdError: Command error.
|
||||
ChatCmdError: Command error (only used in WebSockets API).
|
||||
- type: "chatCmdError"
|
||||
- chatError: [ChatError](./TYPES.md#chaterror)
|
||||
|
||||
@@ -515,7 +522,7 @@ RcvFileAcceptedSndCancelled: File accepted, but no longer sent.
|
||||
- user: [User](./TYPES.md#user)
|
||||
- rcvFileTransfer: [RcvFileTransfer](./TYPES.md#rcvfiletransfer)
|
||||
|
||||
ChatCmdError: Command error.
|
||||
ChatCmdError: Command error (only used in WebSockets API).
|
||||
- type: "chatCmdError"
|
||||
- chatError: [ChatError](./TYPES.md#chaterror)
|
||||
|
||||
@@ -560,7 +567,7 @@ RcvFileCancelled: Cancelled receiving file.
|
||||
- chatItem_: [AChatItem](./TYPES.md#achatitem)?
|
||||
- rcvFileTransfer: [RcvFileTransfer](./TYPES.md#rcvfiletransfer)
|
||||
|
||||
ChatCmdError: Command error.
|
||||
ChatCmdError: Command error (only used in WebSockets API).
|
||||
- type: "chatCmdError"
|
||||
- chatError: [ChatError](./TYPES.md#chaterror)
|
||||
|
||||
@@ -609,7 +616,7 @@ SentGroupInvitation: Group invitation sent.
|
||||
- contact: [Contact](./TYPES.md#contact)
|
||||
- member: [GroupMember](./TYPES.md#groupmember)
|
||||
|
||||
ChatCmdError: Command error.
|
||||
ChatCmdError: Command error (only used in WebSockets API).
|
||||
- type: "chatCmdError"
|
||||
- chatError: [ChatError](./TYPES.md#chaterror)
|
||||
|
||||
@@ -647,7 +654,7 @@ UserAcceptedGroupSent: User accepted group invitation.
|
||||
- groupInfo: [GroupInfo](./TYPES.md#groupinfo)
|
||||
- hostContact: [Contact](./TYPES.md#contact)?
|
||||
|
||||
ChatCmdError: Command error.
|
||||
ChatCmdError: Command error (only used in WebSockets API).
|
||||
- type: "chatCmdError"
|
||||
- chatError: [ChatError](./TYPES.md#chaterror)
|
||||
|
||||
@@ -687,7 +694,7 @@ MemberAccepted: Member accepted to group.
|
||||
- groupInfo: [GroupInfo](./TYPES.md#groupinfo)
|
||||
- member: [GroupMember](./TYPES.md#groupmember)
|
||||
|
||||
ChatCmdError: Command error.
|
||||
ChatCmdError: Command error (only used in WebSockets API).
|
||||
- type: "chatCmdError"
|
||||
- chatError: [ChatError](./TYPES.md#chaterror)
|
||||
|
||||
@@ -731,7 +738,7 @@ MembersRoleUser: Members role changed by user.
|
||||
- members: [[GroupMember](./TYPES.md#groupmember)]
|
||||
- toRole: [GroupMemberRole](./TYPES.md#groupmemberrole)
|
||||
|
||||
ChatCmdError: Command error.
|
||||
ChatCmdError: Command error (only used in WebSockets API).
|
||||
- type: "chatCmdError"
|
||||
- chatError: [ChatError](./TYPES.md#chaterror)
|
||||
|
||||
@@ -772,7 +779,7 @@ MembersBlockedForAllUser: Members blocked for all by admin.
|
||||
- members: [[GroupMember](./TYPES.md#groupmember)]
|
||||
- blocked: bool
|
||||
|
||||
ChatCmdError: Command error.
|
||||
ChatCmdError: Command error (only used in WebSockets API).
|
||||
- type: "chatCmdError"
|
||||
- chatError: [ChatError](./TYPES.md#chaterror)
|
||||
|
||||
@@ -813,7 +820,7 @@ UserDeletedMembers: Members deleted.
|
||||
- members: [[GroupMember](./TYPES.md#groupmember)]
|
||||
- withMessages: bool
|
||||
|
||||
ChatCmdError: Command error.
|
||||
ChatCmdError: Command error (only used in WebSockets API).
|
||||
- type: "chatCmdError"
|
||||
- chatError: [ChatError](./TYPES.md#chaterror)
|
||||
|
||||
@@ -853,7 +860,7 @@ LeftMemberUser: User left group.
|
||||
- user: [User](./TYPES.md#user)
|
||||
- groupInfo: [GroupInfo](./TYPES.md#groupinfo)
|
||||
|
||||
ChatCmdError: Command error.
|
||||
ChatCmdError: Command error (only used in WebSockets API).
|
||||
- type: "chatCmdError"
|
||||
- chatError: [ChatError](./TYPES.md#chaterror)
|
||||
|
||||
@@ -890,7 +897,7 @@ GroupMembers: Group members.
|
||||
- user: [User](./TYPES.md#user)
|
||||
- group: [Group](./TYPES.md#group)
|
||||
|
||||
ChatCmdError: Command error.
|
||||
ChatCmdError: Command error (only used in WebSockets API).
|
||||
- type: "chatCmdError"
|
||||
- chatError: [ChatError](./TYPES.md#chaterror)
|
||||
|
||||
@@ -929,7 +936,7 @@ GroupCreated: Group created.
|
||||
- user: [User](./TYPES.md#user)
|
||||
- groupInfo: [GroupInfo](./TYPES.md#groupinfo)
|
||||
|
||||
ChatCmdError: Command error.
|
||||
ChatCmdError: Command error (only used in WebSockets API).
|
||||
- type: "chatCmdError"
|
||||
- chatError: [ChatError](./TYPES.md#chaterror)
|
||||
|
||||
@@ -969,7 +976,7 @@ GroupUpdated: Group updated.
|
||||
- toGroup: [GroupInfo](./TYPES.md#groupinfo)
|
||||
- member_: [GroupMember](./TYPES.md#groupmember)?
|
||||
|
||||
ChatCmdError: Command error.
|
||||
ChatCmdError: Command error (only used in WebSockets API).
|
||||
- type: "chatCmdError"
|
||||
- chatError: [ChatError](./TYPES.md#chaterror)
|
||||
|
||||
@@ -1013,7 +1020,7 @@ GroupLinkCreated: Group link created.
|
||||
- groupInfo: [GroupInfo](./TYPES.md#groupinfo)
|
||||
- groupLink: [GroupLink](./TYPES.md#grouplink)
|
||||
|
||||
ChatCmdError: Command error.
|
||||
ChatCmdError: Command error (only used in WebSockets API).
|
||||
- type: "chatCmdError"
|
||||
- chatError: [ChatError](./TYPES.md#chaterror)
|
||||
|
||||
@@ -1052,7 +1059,7 @@ GroupLink: Group link.
|
||||
- groupInfo: [GroupInfo](./TYPES.md#groupinfo)
|
||||
- groupLink: [GroupLink](./TYPES.md#grouplink)
|
||||
|
||||
ChatCmdError: Command error.
|
||||
ChatCmdError: Command error (only used in WebSockets API).
|
||||
- type: "chatCmdError"
|
||||
- chatError: [ChatError](./TYPES.md#chaterror)
|
||||
|
||||
@@ -1089,7 +1096,7 @@ GroupLinkDeleted: Group link deleted.
|
||||
- user: [User](./TYPES.md#user)
|
||||
- groupInfo: [GroupInfo](./TYPES.md#groupinfo)
|
||||
|
||||
ChatCmdError: Command error.
|
||||
ChatCmdError: Command error (only used in WebSockets API).
|
||||
- type: "chatCmdError"
|
||||
- chatError: [ChatError](./TYPES.md#chaterror)
|
||||
|
||||
@@ -1127,7 +1134,7 @@ GroupLink: Group link.
|
||||
- groupInfo: [GroupInfo](./TYPES.md#groupinfo)
|
||||
- groupLink: [GroupLink](./TYPES.md#grouplink)
|
||||
|
||||
ChatCmdError: Command error.
|
||||
ChatCmdError: Command error (only used in WebSockets API).
|
||||
- type: "chatCmdError"
|
||||
- chatError: [ChatError](./TYPES.md#chaterror)
|
||||
|
||||
@@ -1171,7 +1178,7 @@ Invitation: One-time invitation.
|
||||
- connLinkInvitation: [CreatedConnLink](./TYPES.md#createdconnlink)
|
||||
- connection: [PendingContactConnection](./TYPES.md#pendingcontactconnection)
|
||||
|
||||
ChatCmdError: Command error.
|
||||
ChatCmdError: Command error (only used in WebSockets API).
|
||||
- type: "chatCmdError"
|
||||
- chatError: [ChatError](./TYPES.md#chaterror)
|
||||
|
||||
@@ -1210,7 +1217,7 @@ ConnectionPlan: Connection link information.
|
||||
- connLink: [CreatedConnLink](./TYPES.md#createdconnlink)
|
||||
- connectionPlan: [ConnectionPlan](./TYPES.md#connectionplan)
|
||||
|
||||
ChatCmdError: Command error.
|
||||
ChatCmdError: Command error (only used in WebSockets API).
|
||||
- type: "chatCmdError"
|
||||
- chatError: [ChatError](./TYPES.md#chaterror)
|
||||
|
||||
@@ -1219,7 +1226,7 @@ ChatCmdError: Command error.
|
||||
|
||||
### APIConnect
|
||||
|
||||
Connect via prepared SimpleX link. The link can be 1-time invitation link, contact address or group link
|
||||
Connect via prepared SimpleX link. The link can be 1-time invitation link, contact address or group link.
|
||||
|
||||
*Network usage*: interactive.
|
||||
|
||||
@@ -1235,7 +1242,7 @@ Connect via prepared SimpleX link. The link can be 1-time invitation link, conta
|
||||
```
|
||||
|
||||
```javascript
|
||||
'/_connect ' + userId + (preparedLink_ ? ' ' + preparedLink_.toString() : '') // JavaScript
|
||||
'/_connect ' + userId + (preparedLink_ ? ' ' + CreatedConnLink.cmdString(preparedLink_) : '') // JavaScript
|
||||
```
|
||||
|
||||
```python
|
||||
@@ -1261,7 +1268,7 @@ SentInvitation: Invitation sent to contact address.
|
||||
- connection: [PendingContactConnection](./TYPES.md#pendingcontactconnection)
|
||||
- customUserProfile: [Profile](./TYPES.md#profile)?
|
||||
|
||||
ChatCmdError: Command error.
|
||||
ChatCmdError: Command error (only used in WebSockets API).
|
||||
- type: "chatCmdError"
|
||||
- chatError: [ChatError](./TYPES.md#chaterror)
|
||||
|
||||
@@ -1311,7 +1318,7 @@ SentInvitation: Invitation sent to contact address.
|
||||
- connection: [PendingContactConnection](./TYPES.md#pendingcontactconnection)
|
||||
- customUserProfile: [Profile](./TYPES.md#profile)?
|
||||
|
||||
ChatCmdError: Command error.
|
||||
ChatCmdError: Command error (only used in WebSockets API).
|
||||
- type: "chatCmdError"
|
||||
- chatError: [ChatError](./TYPES.md#chaterror)
|
||||
|
||||
@@ -1348,7 +1355,7 @@ AcceptingContactRequest: Contact request accepted.
|
||||
- user: [User](./TYPES.md#user)
|
||||
- contact: [Contact](./TYPES.md#contact)
|
||||
|
||||
ChatCmdError: Command error.
|
||||
ChatCmdError: Command error (only used in WebSockets API).
|
||||
- type: "chatCmdError"
|
||||
- chatError: [ChatError](./TYPES.md#chaterror)
|
||||
|
||||
@@ -1386,7 +1393,7 @@ ContactRequestRejected: Contact request rejected.
|
||||
- contactRequest: [UserContactRequest](./TYPES.md#usercontactrequest)
|
||||
- contact_: [Contact](./TYPES.md#contact)?
|
||||
|
||||
ChatCmdError: Command error.
|
||||
ChatCmdError: Command error (only used in WebSockets API).
|
||||
- type: "chatCmdError"
|
||||
- chatError: [ChatError](./TYPES.md#chaterror)
|
||||
|
||||
@@ -1428,7 +1435,7 @@ ContactsList: Contacts.
|
||||
- user: [User](./TYPES.md#user)
|
||||
- contacts: [[Contact](./TYPES.md#contact)]
|
||||
|
||||
ChatCmdError: Command error.
|
||||
ChatCmdError: Command error (only used in WebSockets API).
|
||||
- type: "chatCmdError"
|
||||
- chatError: [ChatError](./TYPES.md#chaterror)
|
||||
|
||||
@@ -1467,7 +1474,7 @@ GroupsList: Groups.
|
||||
- user: [User](./TYPES.md#user)
|
||||
- groups: [[GroupInfo](./TYPES.md#groupinfo)]
|
||||
|
||||
ChatCmdError: Command error.
|
||||
ChatCmdError: Command error (only used in WebSockets API).
|
||||
- type: "chatCmdError"
|
||||
- chatError: [ChatError](./TYPES.md#chaterror)
|
||||
|
||||
@@ -1491,7 +1498,7 @@ Delete chat.
|
||||
```
|
||||
|
||||
```javascript
|
||||
'/_delete ' + chatRef.toString() + ' ' + chatDeleteMode.toString() // JavaScript
|
||||
'/_delete ' + ChatRef.cmdString(chatRef) + ' ' + ChatDeleteMode.cmdString(chatDeleteMode) // JavaScript
|
||||
```
|
||||
|
||||
```python
|
||||
@@ -1515,7 +1522,118 @@ GroupDeletedUser: User deleted group.
|
||||
- user: [User](./TYPES.md#user)
|
||||
- groupInfo: [GroupInfo](./TYPES.md#groupinfo)
|
||||
|
||||
ChatCmdError: Command error.
|
||||
ChatCmdError: Command error (only used in WebSockets API).
|
||||
- type: "chatCmdError"
|
||||
- chatError: [ChatError](./TYPES.md#chaterror)
|
||||
|
||||
---
|
||||
|
||||
|
||||
### APISetGroupCustomData
|
||||
|
||||
Set group custom data.
|
||||
|
||||
*Network usage*: no.
|
||||
|
||||
**Parameters**:
|
||||
- groupId: int64
|
||||
- customData: JSONObject?
|
||||
|
||||
**Syntax**:
|
||||
|
||||
```
|
||||
/_set custom #<groupId>[ <json(customData)>]
|
||||
```
|
||||
|
||||
```javascript
|
||||
'/_set custom #' + groupId + (customData ? ' ' + JSON.stringify(customData) : '') // JavaScript
|
||||
```
|
||||
|
||||
```python
|
||||
'/_set custom #' + str(groupId) + ((' ' + json.dumps(customData)) if customData is not None else '') # Python
|
||||
```
|
||||
|
||||
**Responses**:
|
||||
|
||||
CmdOk: Ok.
|
||||
- type: "cmdOk"
|
||||
- user_: [User](./TYPES.md#user)?
|
||||
|
||||
ChatCmdError: Command error (only used in WebSockets API).
|
||||
- type: "chatCmdError"
|
||||
- chatError: [ChatError](./TYPES.md#chaterror)
|
||||
|
||||
---
|
||||
|
||||
|
||||
### APISetContactCustomData
|
||||
|
||||
Set contact custom data.
|
||||
|
||||
*Network usage*: no.
|
||||
|
||||
**Parameters**:
|
||||
- contactId: int64
|
||||
- customData: JSONObject?
|
||||
|
||||
**Syntax**:
|
||||
|
||||
```
|
||||
/_set custom @<contactId>[ <json(customData)>]
|
||||
```
|
||||
|
||||
```javascript
|
||||
'/_set custom @' + contactId + (customData ? ' ' + JSON.stringify(customData) : '') // JavaScript
|
||||
```
|
||||
|
||||
```python
|
||||
'/_set custom @' + str(contactId) + ((' ' + json.dumps(customData)) if customData is not None else '') # Python
|
||||
```
|
||||
|
||||
**Responses**:
|
||||
|
||||
CmdOk: Ok.
|
||||
- type: "cmdOk"
|
||||
- user_: [User](./TYPES.md#user)?
|
||||
|
||||
ChatCmdError: Command error (only used in WebSockets API).
|
||||
- type: "chatCmdError"
|
||||
- chatError: [ChatError](./TYPES.md#chaterror)
|
||||
|
||||
---
|
||||
|
||||
|
||||
### APISetUserAutoAcceptMemberContacts
|
||||
|
||||
Set auto-accept member contacts.
|
||||
|
||||
*Network usage*: no.
|
||||
|
||||
**Parameters**:
|
||||
- userId: int64
|
||||
- onOff: bool
|
||||
|
||||
**Syntax**:
|
||||
|
||||
```
|
||||
/_set accept member contacts <userId> on|off
|
||||
```
|
||||
|
||||
```javascript
|
||||
'/_set accept member contacts ' + userId + ' ' + (onOff ? 'on' : 'off') // JavaScript
|
||||
```
|
||||
|
||||
```python
|
||||
'/_set accept member contacts ' + str(userId) + ' ' + ('on' if onOff else 'off') # Python
|
||||
```
|
||||
|
||||
**Responses**:
|
||||
|
||||
CmdOk: Ok.
|
||||
- type: "cmdOk"
|
||||
- user_: [User](./TYPES.md#user)?
|
||||
|
||||
ChatCmdError: Command error (only used in WebSockets API).
|
||||
- type: "chatCmdError"
|
||||
- chatError: [ChatError](./TYPES.md#chaterror)
|
||||
|
||||
@@ -1529,7 +1647,7 @@ Most bots don't need to use these commands, as bot profile can be configured man
|
||||
|
||||
### ShowActiveUser
|
||||
|
||||
Get active user profile
|
||||
Get active user profile.
|
||||
|
||||
*Network usage*: no.
|
||||
|
||||
@@ -1545,7 +1663,7 @@ ActiveUser: Active user profile.
|
||||
- type: "activeUser"
|
||||
- user: [User](./TYPES.md#user)
|
||||
|
||||
ChatCmdError: Command error.
|
||||
ChatCmdError: Command error (only used in WebSockets API).
|
||||
- type: "chatCmdError"
|
||||
- chatError: [ChatError](./TYPES.md#chaterror)
|
||||
|
||||
@@ -1554,7 +1672,7 @@ ChatCmdError: Command error.
|
||||
|
||||
### CreateActiveUser
|
||||
|
||||
Create new user profile
|
||||
Create new user profile.
|
||||
|
||||
*Network usage*: no.
|
||||
|
||||
@@ -1581,7 +1699,7 @@ ActiveUser: Active user profile.
|
||||
- type: "activeUser"
|
||||
- user: [User](./TYPES.md#user)
|
||||
|
||||
ChatCmdError: Command error.
|
||||
ChatCmdError: Command error (only used in WebSockets API).
|
||||
- type: "chatCmdError"
|
||||
- chatError: [ChatError](./TYPES.md#chaterror)
|
||||
|
||||
@@ -1594,7 +1712,7 @@ ChatCmdError: Command error.
|
||||
|
||||
### ListUsers
|
||||
|
||||
Get all user profiles
|
||||
Get all user profiles.
|
||||
|
||||
*Network usage*: no.
|
||||
|
||||
@@ -1610,7 +1728,7 @@ UsersList: Users.
|
||||
- type: "usersList"
|
||||
- users: [[UserInfo](./TYPES.md#userinfo)]
|
||||
|
||||
ChatCmdError: Command error.
|
||||
ChatCmdError: Command error (only used in WebSockets API).
|
||||
- type: "chatCmdError"
|
||||
- chatError: [ChatError](./TYPES.md#chaterror)
|
||||
|
||||
@@ -1619,7 +1737,7 @@ ChatCmdError: Command error.
|
||||
|
||||
### APISetActiveUser
|
||||
|
||||
Set active user profile
|
||||
Set active user profile.
|
||||
|
||||
*Network usage*: no.
|
||||
|
||||
@@ -1647,7 +1765,7 @@ ActiveUser: Active user profile.
|
||||
- type: "activeUser"
|
||||
- user: [User](./TYPES.md#user)
|
||||
|
||||
ChatCmdError: Command error.
|
||||
ChatCmdError: Command error (only used in WebSockets API).
|
||||
- type: "chatCmdError"
|
||||
- chatError: [ChatError](./TYPES.md#chaterror)
|
||||
|
||||
@@ -1688,7 +1806,7 @@ CmdOk: Ok.
|
||||
- type: "cmdOk"
|
||||
- user_: [User](./TYPES.md#user)?
|
||||
|
||||
ChatCmdError: Command error.
|
||||
ChatCmdError: Command error (only used in WebSockets API).
|
||||
- type: "chatCmdError"
|
||||
- chatError: [ChatError](./TYPES.md#chaterror)
|
||||
|
||||
@@ -1732,7 +1850,7 @@ UserProfileNoChange: User profile was not changed.
|
||||
- type: "userProfileNoChange"
|
||||
- user: [User](./TYPES.md#user)
|
||||
|
||||
ChatCmdError: Command error.
|
||||
ChatCmdError: Command error (only used in WebSockets API).
|
||||
- type: "chatCmdError"
|
||||
- chatError: [ChatError](./TYPES.md#chaterror)
|
||||
|
||||
@@ -1771,8 +1889,60 @@ ContactPrefsUpdated: Contact preferences updated.
|
||||
- fromContact: [Contact](./TYPES.md#contact)
|
||||
- toContact: [Contact](./TYPES.md#contact)
|
||||
|
||||
ChatCmdError: Command error.
|
||||
ChatCmdError: Command error (only used in WebSockets API).
|
||||
- type: "chatCmdError"
|
||||
- chatError: [ChatError](./TYPES.md#chaterror)
|
||||
|
||||
---
|
||||
|
||||
|
||||
## Chat management
|
||||
|
||||
These commands should not be used with CLI-based bots
|
||||
|
||||
|
||||
### StartChat
|
||||
|
||||
Start chat controller.
|
||||
|
||||
*Network usage*: no.
|
||||
|
||||
**Parameters**:
|
||||
- mainApp: bool
|
||||
- enableSndFiles: bool
|
||||
|
||||
**Syntax**:
|
||||
|
||||
```
|
||||
/_start
|
||||
```
|
||||
|
||||
**Responses**:
|
||||
|
||||
ChatStarted: Chat started.
|
||||
- type: "chatStarted"
|
||||
|
||||
ChatRunning: Chat running.
|
||||
- type: "chatRunning"
|
||||
|
||||
---
|
||||
|
||||
|
||||
### APIStopChat
|
||||
|
||||
Stop chat controller.
|
||||
|
||||
*Network usage*: no.
|
||||
|
||||
**Syntax**:
|
||||
|
||||
```
|
||||
/_stop
|
||||
```
|
||||
|
||||
**Response**:
|
||||
|
||||
ChatStopped: Chat stopped.
|
||||
- type: "chatStopped"
|
||||
|
||||
---
|
||||
|
||||
+48
-1
@@ -62,6 +62,11 @@ This file is generated automatically.
|
||||
- [SentGroupInvitation](#sentgroupinvitation)
|
||||
- [GroupLinkConnecting](#grouplinkconnecting)
|
||||
|
||||
[Network connection events](#network-connection-events)
|
||||
- [HostConnected](#hostconnected)
|
||||
- [HostDisconnected](#hostdisconnected)
|
||||
- [SubscriptionStatus](#subscriptionstatus)
|
||||
|
||||
[Error events](#error-events)
|
||||
- [MessageError](#messageerror)
|
||||
- [ChatError](#chaterror)
|
||||
@@ -685,6 +690,48 @@ Sent when bot joins group via another user link.
|
||||
---
|
||||
|
||||
|
||||
## Network connection events
|
||||
|
||||
|
||||
|
||||
|
||||
### HostConnected
|
||||
|
||||
Messaging or file server connected
|
||||
|
||||
**Record type**:
|
||||
- type: "hostConnected"
|
||||
- protocol: string
|
||||
- transportHost: string
|
||||
|
||||
---
|
||||
|
||||
|
||||
### HostDisconnected
|
||||
|
||||
Messaging or file server disconnected
|
||||
|
||||
**Record type**:
|
||||
- type: "hostDisconnected"
|
||||
- protocol: string
|
||||
- transportHost: string
|
||||
|
||||
---
|
||||
|
||||
|
||||
### SubscriptionStatus
|
||||
|
||||
Messaging subscription status changed
|
||||
|
||||
**Record type**:
|
||||
- type: "subscriptionStatus"
|
||||
- server: string
|
||||
- subscriptionStatus: [SubscriptionStatus](./TYPES.md#subscriptionstatus)
|
||||
- connections: [string]
|
||||
|
||||
---
|
||||
|
||||
|
||||
## Error events
|
||||
|
||||
Bots may log these events for debugging. There will be many error events - this does NOT indicate a malfunction - e.g., they may happen because of bad network connectivity, or because messages may be delivered to deleted chats for a short period of time (they will be ignored).
|
||||
@@ -705,7 +752,7 @@ Message error.
|
||||
|
||||
### ChatError
|
||||
|
||||
Chat error.
|
||||
Chat error (only used in WebSockets API).
|
||||
|
||||
**Record type**:
|
||||
- type: "chatError"
|
||||
|
||||
+55
-10
@@ -153,6 +153,7 @@ This file is generated automatically.
|
||||
- [SndGroupEvent](#sndgroupevent)
|
||||
- [SrvError](#srverror)
|
||||
- [StoreError](#storeerror)
|
||||
- [SubscriptionStatus](#subscriptionstatus)
|
||||
- [SwitchPhase](#switchphase)
|
||||
- [TimedMessagesGroupPreference](#timedmessagesgrouppreference)
|
||||
- [TimedMessagesPreference](#timedmessagespreference)
|
||||
@@ -765,6 +766,7 @@ Group:
|
||||
- itemTimed: [CITimed](#citimed)?
|
||||
- itemLive: bool?
|
||||
- userMention: bool
|
||||
- hasLink: bool
|
||||
- deletable: bool
|
||||
- editable: bool
|
||||
- forwardedByMember: int64?
|
||||
@@ -1306,7 +1308,7 @@ Used in API commands. Chat scope can only be passed with groups.
|
||||
```
|
||||
|
||||
```javascript
|
||||
chatType.toString() + chatId + (chatScope ? chatScope.toString() : '') // JavaScript
|
||||
ChatType.cmdString(chatType) + chatId + (chatScope ? GroupChatScope.cmdString(chatScope) : '') // JavaScript
|
||||
```
|
||||
|
||||
```python
|
||||
@@ -1468,15 +1470,35 @@ LARGE:
|
||||
|
||||
## ConnStatus
|
||||
|
||||
**Enum type**:
|
||||
- "new"
|
||||
- "prepared"
|
||||
- "joined"
|
||||
- "requested"
|
||||
- "accepted"
|
||||
- "snd-ready"
|
||||
- "ready"
|
||||
- "deleted"
|
||||
**Discriminated union type**:
|
||||
|
||||
New:
|
||||
- type: "new"
|
||||
|
||||
Prepared:
|
||||
- type: "prepared"
|
||||
|
||||
Joined:
|
||||
- type: "joined"
|
||||
|
||||
Requested:
|
||||
- type: "requested"
|
||||
|
||||
Accepted:
|
||||
- type: "accepted"
|
||||
|
||||
SndReady:
|
||||
- type: "sndReady"
|
||||
|
||||
Ready:
|
||||
- type: "ready"
|
||||
|
||||
Deleted:
|
||||
- type: "deleted"
|
||||
|
||||
Failed:
|
||||
- type: "failed"
|
||||
- connError: string
|
||||
|
||||
|
||||
---
|
||||
@@ -1962,6 +1984,9 @@ Snippet:
|
||||
Secret:
|
||||
- type: "secret"
|
||||
|
||||
Small:
|
||||
- type: "small"
|
||||
|
||||
Colored:
|
||||
- type: "colored"
|
||||
- color: [Color](#color)
|
||||
@@ -3591,6 +3616,26 @@ WorkItemError:
|
||||
- errContext: string
|
||||
|
||||
|
||||
---
|
||||
|
||||
## SubscriptionStatus
|
||||
|
||||
**Discriminated union type**:
|
||||
|
||||
Active:
|
||||
- type: "active"
|
||||
|
||||
Pending:
|
||||
- type: "pending"
|
||||
|
||||
Removed:
|
||||
- type: "removed"
|
||||
- subError: string
|
||||
|
||||
NoSub:
|
||||
- type: "noSub"
|
||||
|
||||
|
||||
---
|
||||
|
||||
## SwitchPhase
|
||||
|
||||
Reference in New Issue
Block a user