Repository navigation
Tweaking warnings related to missing accessibility fields text and fallback when posting messages - #983
Merged
Conversation
…`fallback` when posting messages.
Codecov Report
@@ Coverage Diff @@
## main #983 +/- ##
============================================
- Coverage 76.87% 76.86% -0.01%
Complexity 3677 3677
============================================
Files 400 400
Lines 11089 11089
Branches 1105 1105
============================================
- Hits 8525 8524 -1
Misses 1895 1895
- Partials 669 670 +1
Continue to review full report at Codecov.
|
seratch
reviewed
May 6, 2022
Comment on lines
+885
to
+886
| // 2021-01-05 14:38:54,767 WARN [main] com.slack.api.methods.RequestFormBuilder 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 `blocks` cannot be rendered such as: system push notifications, assistive technology such as screen readers, etc. | ||
| // 2021-01-05 14:38:55,055 WARN [main] com.slack.api.methods.RequestFormBuilder 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). |
Contributor
There was a problem hiding this comment.
@filmaj Testing the logging output with the current code is not so easy that I added the evidence here (better than nothing!). Can you replace the logging output with your own one? You can find your logs at slack-api-client/logs/console.log.
seratch
approved these changes
May 6, 2022
Contributor
|
@filmaj Thanks for working on this! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Making similar changes here as to slackapi/node-slack-sdk#1479.
Not sure about the tests... I didn't change the logic for any tests. Wasn't sure how to go about testing the warnings raised. If anyone has suggestions for me on how to add tests for this, please let me know!