Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Slack images will not work if you don`t provide a title #182

Closed
davidvitora opened this issue Sep 28, 2021 · 0 comments
Closed

[BUG] Slack images will not work if you don`t provide a title #182

davidvitora opened this issue Sep 28, 2021 · 0 comments

Comments

@davidvitora
Copy link
Contributor

Botpress core version: 12.26.3

All though titles are not required for other channels when using the image content-type, if you don`t provide, it will not work in the Slack Channel and an error will be thrown:

[ERROR] web-api:WebClient:0 failed to match all allowed schemas [json-pointer:/blocks/0/title]
[ERROR] web-api:WebClient:0 missing required field: text [json-pointer:/blocks/0/title]
09/28/2021 14:20:49.466 [Messaging] app:slack Error occurred when sending a message. Error: An API error occurred: invalid_blocks
at Object.platformErrorFromResult (C:\snapshot\messaging\node_modules@slack\web-api\dist\errors.js:51:33)
at WebClient.apiCall (C:\snapshot\messaging\node_modules@slack\web-api\dist\WebClient.js:156:28)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async SlackCommonSender.send (C:\snapshot\messaging\packages\server\dist\channels\slack\senders\common.js)
at async SlackConduit.sendToEndpoint (C:\snapshot\messaging\packages\server\dist\channels\base\conduit.js)
at async InstanceService.sendMessageToInstance (C:\snapshot\messaging\packages\server\dist\instances\service.js)
{

to fix this you need to specify a title:

image

Since titles are not required by the content type, I believe the renderer should auto-generate one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants