mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-08-28 12:04:11 +00:00
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:
@@ -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"},
|
||||
|
||||
Reference in New Issue
Block a user