eschutho commented on code in PR #28797:
URL: https://github.com/apache/superset/pull/28797#discussion_r1624996094
##########
superset/reports/notifications/slack.py:
##########
@@ -60,16 +61,24 @@ class SlackNotification(BaseNotification): # pylint:
disable=too-few-public-met
type = ReportRecipientType.SLACK
- def _get_channel(self) -> str:
+ def _get_channels(self, client: WebClient) -> List[str]:
"""
Get the recipient's channel(s).
- Note Slack SDK uses "channel" to refer to one or more
- channels. Multiple channels are demarcated by a comma.
- :returns: The comma separated list of channel(s)
+ :returns: A list of channel ids: "EID676L"
"""
recipient_str =
json.loads(self._recipient.recipient_config_json)["target"]
- return ",".join(get_email_address_list(recipient_str))
+ channel_recipients = get_email_address_list(recipient_str)
+
+ conversations_list_response = client.conversations_list(
+ types="public_channel,private_channel"
Review Comment:
oh, that's a good point. @Vitor-Avila had a great solution which is to try
the deprecated method first and then try the new one, since only new apps are
affected right now. I'm also nervous about introducing a breaking change here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]