rfc: bot messages and buttons, core: command markdown, supported commands in profile preferences, chat sessions preference, peer type field in profile to identify bots (#5360)

* rfc: bot messages and buttons

* update

* update bot rfc

* core: add bot commands to chat preferences and peer type to profile

* update postgresql schema

* update query plans

* chat sessions preference

* markdown for bot commands

* schema

* core: file preference, options to create bot from CLI

* core: different command type

* ios: commands menu

* update types

* update ios

* improve command markdown

* core, ios: update types

* android, desktop: clickable commands in messages in chats with bots

* android, desktop: commands menu

* command menu button, bot icon

* ios: connect flow for bots

* android, desktop: connect flow for bots

* icon

* CLI commands to view and set commands, remove "hidden" property of command, bot api docs

* corrections

* fix inheriting profile preferences to business groups

* note on business address

* ios: export localizations

* fix test

* commands to set file preference on user/contact, tidy up layout and display of command and attachment buttons
This commit is contained in:
Evgeny
2025-08-07 11:13:35 +01:00
committed by GitHub
parent 9596029c30
commit 4811d663e6
93 changed files with 2810 additions and 466 deletions
+69 -5
View File
@@ -20,11 +20,21 @@
"format": "data URI format for base64 encoded image"
}
},
"contactLink": {"ref": "connReqUri"},
"preferences": {
"shortDescr": {
"type": "string",
"metadata": {"comment": "profile bio (160 characters)"}
},
"contactLink": {"ref": "connReqUri"},
"peerType": {"enum": ["human", "bot"]},
"preferences": {
"optionalProperties": {
"commands": {
"elements": {"ref": "command"}
}
},
"additionalProperties": true,
"metadata": {
"format": "JSON encoded user preferences"
"format": "an object with user or contact preferences"
}
}
},
@@ -47,15 +57,59 @@
"format": "data URI format for base64 encoded image"
}
},
"groupPreferences": {
"shortDescr": {
"type": "string",
"metadata": {"comment": "group purpose / short description (160 characters)"}
},
"groupPreferences": {
"optionalProperties": {
"commands": {
"elements": {"ref": "command"}
}
},
"additionalProperties": "true",
"metadata": {
"format": "JSON encoded user preferences"
"format": "an object with group preferences"
}
}
},
"additionalProperties": true
},
"command": {
"discriminator": "type",
"mapping": {
"command": {
"properties": {
"keyword": {
"type": "string",
"metadata": {"format": "Must start from / and consist from letters, digits and underscores only, no punctuation or spaces"}
},
"label": {
"type": "string",
"metadata": {"comment": "shown to the user after command keyword in menus"}
}
},
"optionalProperties": {
"params": {
"type": "string",
"metadata": {"comment": "Params that can follow after keyword using command-line syntax. If params property is not present, command will be sent on selection"}}
},
"hidden": {
"type": "bool",
"metadata": {"comment": "Won't be shown in menu when true"}
}
}
},
"menu": {
"properties": {
"label": {"type": "string"},
"commands": {
"elements": {"ref": "command"}
}
}
}
}
},
"msgContainer": {
"properties": {
"content": {"ref": "msgContent"}
@@ -658,6 +712,16 @@
}
}
},
"x.grp.prefs": {
"properties": {
"msgId": {"ref": "base64url"},
"params": {
"properties": {
"groupPreferences": {"ref": "groupPreferences"}
}
}
}
},
"x.grp.direct.inv": {
"properties": {
"msgId": {"ref": "base64url"},