17 Commits

Author SHA1 Message Date
jsuar
a2d76cac5a
Fix Slack file upload (#135818)
* pgrade Slack integration to use AsyncWebClient and support files_upload_v2

- Replaced deprecated WebClient with AsyncWebClient throughout the integration.
- Removed the unsupported `run_async` parameter.
- Added a helper function to resolve channel names to channel IDs.
- Updated `_async_send_local_file_message` and `_async_send_remote_file_message` to handle Slack's new API requirements, including per-channel uploads.
- Updated dependency from slackclient==2.5.0 to slack-sdk>=3.0.0.
- Improved error handling and logging for channel resolution and file uploads.

* Fix test to use AsyncWebClient for Slack authentication flow

* Fix Slack authentication URL by removing the www subdomain

* Refactor Slack file upload functionality and add utility for file uploads
2025-01-19 21:09:04 +01:00
epenet
9204ccfa17
Use is in ConfigEntryState enum comparison in tests (N-Z) (#114926) 2024-04-05 17:37:00 +02:00
Joost Lekkerkerker
ee66f6ec8c
Use is in enum comparison in config flow tests P-T (#114675) 2024-04-02 11:21:50 -10:00
Marc Mueller
aa16a9d707
Add empty line after module docstring (3) (#112750) 2024-03-08 20:38:34 +01:00
Marc Mueller
7d6251ca08
Add empty line after module docstring [tests q-s] (#112711) 2024-03-08 14:47:22 +01:00
Fletcher
11c4c37cf9
Add Slack thread/reply support (#93384) 2023-09-21 11:06:55 +02:00
G Johansson
05fbc09ef0
Remove Slack YAML configuration (#94106) 2023-06-06 16:01:40 +02:00
epenet
4d73de6295
Remove unused function in slack tests (#87618) 2023-02-07 07:52:15 -06:00
epenet
aa00114c2f
Add return type to async tests without arguments (#87612) 2023-02-07 10:26:56 +01:00
Franck Nijhof
7cd68381f1
Search/replace RESULT_TYPE_* by FlowResultType enum (#74642) 2022-07-07 19:57:36 +03:00
Robert Hillis
4ea6e5dfc0
Add config flow to Slack integration (#69880) 2022-05-13 20:05:06 -04:00
jan iversen
c351098f04
HomeAssistantType —> HomeAssistant for Integrations p* - s* (#49558) 2021-04-22 19:58:02 +02:00
Marc Mueller
54d1e9985f
Update typing 15 (#48079) 2021-03-18 15:13:22 +01:00
Marc Mueller
c805baf88c
Refactor slack tests (#45561)
* Refactor slack tests

* Changes

* Let service register for tests
2021-01-27 04:32:14 +01:00
Marc Mueller
ad677b9d41
Improve Slack notify component (#45479)
* Add typing information

* Small improvments

* Use %r for exceptions
* Added exception handlers for aiohttp.ClientError
* Added testcase

* Changes after review

* Bugfixes
2021-01-25 17:03:12 -07:00
Franck Nijhof
65cf2fcb6f
Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
Jeff H
a1f70e11ae
Fix slack message icon override (#41212)
* Fix slack message icon override

Allows overriding the icon for individual slack
messages using either an emoji or a URL.

* Run python3 -m script.gen_requirements_all

* Add period to first line

* Add support for python 3.7 testing

AsyncMock is only available from python 3.8+. Prior to this,
CoroutineMock is used which doesn't mock the method so it
needs to be done manually.

* Fix tests for python3.7 compatibility

The Python3.7 mock call object doesn't have the kwargs helper property.

* Update default emoji test docstring
2020-10-04 14:17:24 -07:00