FIX: ensures automation can send chat message (#23478)

It's been broken in 243793ec6e. Sadly it's not very practical to write cross plugins tests.
This commit is contained in:
Joffrey JAFFEUX 2023-09-08 16:37:05 +02:00 committed by GitHub
parent 4db5310135
commit 7bcf934765
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -417,10 +417,10 @@ after_initialize do
placeholders = { channel_name: channel.title(sender) }.merge(context["placeholders"] || {})
creator =
Chat::CreateMessage.call(
chat_channel: channel,
::Chat::CreateMessage.call(
chat_channel_id: channel.id,
guardian: sender.guardian,
content: utils.apply_placeholders(fields.dig("message", "value"), placeholders),
message: utils.apply_placeholders(fields.dig("message", "value"), placeholders),
)
if creator.failure?