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

Add top-level text argument #718

Merged
merged 1 commit into from
Nov 15, 2023
Merged

Add top-level text argument #718

merged 1 commit into from
Nov 15, 2023

Conversation

ctbfourone
Copy link
Contributor

From last build:

Run slackapi/[email protected]
[WARN]  web-api:WebClient:0 The top-level `text` argument is missing in the request payload for a chat.postMessage call - It's a best practice to always provide a `text` argument when posting a message. The `text` is used in places where the content cannot be rendered such as: system push notifications, assistive technology such as screen readers, etc.
[WARN]  web-api:WebClient:0 Additionally, the attachment-level `fallback` argument is missing in the request payload for a chat.postMessage call - To avoid this warning, it is recommended to always provide a top-level `text` argument when posting a message. Alternatively, you can provide an attachment-level `fallback` argument, though this is now considered a legacy field (see https://api.slack.com/reference/messaging/attachments#legacy_fields for more details).
Error:   web-api:WebClient:0 failed to match all allowed schemas [json-pointer:/attachments/0/blocks/1/fields/3]
Error:   web-api:WebClient:0 must be more than 0 characters [json-pointer:/attachments/0/blocks/1/fields/3/text]
Error: Error: An API error occurred: invalid_attachments

@ctbfourone ctbfourone requested a review from a team as a code owner November 15, 2023 21:50
@gcoxmoz
Copy link
Contributor

gcoxmoz commented Nov 15, 2023

An emoji in a field called ‘text’? Is that cromulent?

@ctbfourone
Copy link
Contributor Author

An emoji in a field called ‘text’? Is that cromulent?

I think it's permitted though not terribly helpful. I just didn't want to leave it empty.

Copy link
Contributor

@gcoxmoz gcoxmoz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alrighty, "you at least thought about it," good enough for me.

@ctbfourone ctbfourone merged commit 17e1782 into master Nov 15, 2023
3 checks passed
@ctbfourone ctbfourone deleted the slackapi-text-arg branch November 15, 2023 22:54
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

Successfully merging this pull request may close these issues.

2 participants