-
-
Notifications
You must be signed in to change notification settings - Fork 33.1k
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
Fix Slack channel and user ID resolution for file uploads #140247
base: dev
Are you sure you want to change the base?
Conversation
Hey there @tkdrob, @FletcherAU, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
- Added regex patterns to identify user IDs and channel IDs - Implemented channel ID caching to reduce API calls - Added direct messaging support via user IDs - Created comprehensive target resolution system - Updated tests to verify all target types and edge cases
- add back comments
68c44a9
to
5e5e7b3
Compare
@tkdrob, @FletcherAU, I'm still preparing the PR and an accompanying documentation PR, but could one of you delete this home-assistant bot message? It's exposing a personal email address due to a config error on my side |
I can't help with that sorry, it'll need to be someone with actual permissions for the repo. |
It this ready for merge? Or what changes need to be made? :-) |
Proposed change
This PR fixes issues reported in #137555 and #137567 where file uploads to Slack no longer work when using channel IDs or user IDs as targets. When I implemented support for the new Slack API
files_upload_v2
(in PR #135818), I inadvertently broke support for sending files to channel IDs and direct messages.The changes improve target resolution to properly handle different types of Slack identifiers (channel names, channel IDs, and user IDs) and implement simple caching to reduce API calls. This allows users to continue using any supported target format when sending files via Slack.
Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
.To help with the load of incoming pull requests: