fix issue with slack_sdk call update (#2966)

# What this PR does

## Checklist

- [x] Unit, integration, and e2e (if applicable) tests updated
- [x] Documentation added (or `pr:no public docs` PR label added if not
required)
- [x] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)
This commit is contained in:
Joey Orlando 2023-09-05 12:25:11 +02:00 committed by GitHub
parent 8e1962e89a
commit 395977d934
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 4 deletions

View file

@ -7,11 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Unreleased
## v1.3.33 (2023-09-05)
### Fixed
- Fix issue in `apps.slack.tasks.post_or_update_log_report_message_task` task related to passing tuple to `text` arg
for `SlackClient.chat_postMessage` method by @joeyorlando ([#2966](https://github.com/grafana/oncall/pull/2966))
## v1.3.32 (2023-09-05)
### Added
- Add internal API endpoint for getting schedules shifts for current user by @Ferril([#2928](https://github.com/grafana/oncall/pull/2928))
- Add internal API endpoint for getting schedules shifts for current user by @Ferril ([#2928](https://github.com/grafana/oncall/pull/2928))
### Changed

View file

@ -983,15 +983,15 @@ class UpdateLogReportMessageStep(scenario_step.ScenarioStep):
logger.info(f"Cannot post log message for alert_group {alert_group.pk} because SlackMessage doesn't exist")
return None
text = ("Building escalation plan... :thinking_face:",)
slack_log_message = alert_group.slack_log_message
if slack_log_message is None:
logger.debug(f"Start posting new log message for alert_group {alert_group.pk}")
try:
result = self._slack_client.chat_postMessage(
channel=slack_message.channel_id, thread_ts=slack_message.slack_id, text=text
channel=slack_message.channel_id,
thread_ts=slack_message.slack_id,
text="Building escalation plan... :thinking_face:",
)
except SlackAPITokenException as e:
print(e)