Skip to content

Commit

Permalink
InABox: post a snippet with command output on failure
Browse files Browse the repository at this point in the history
  • Loading branch information
rjbs committed Oct 26, 2023
1 parent 6477c8a commit 4022b0d
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions lib/Synergy/Reactor/InABox.pm
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,19 @@ async sub _setup_droplet ($self, $event, $droplet, $key_file, $args = []) {
return await $event->reply("In-a-Box ($droplet->{name}) is now set up!");
}

if ($event->from_channel->isa('Synergy::Channel::Slack')) {
return await $event->from_channel->slack->api_call(
'files.upload',
{
form_encoded => 1, # Sigh.

content => $stderr,
channels => $event->conversation_address,
initial_comment => "Something went wrong setting up your box:",
},
);
}

return await $event->reply("Something went wrong setting up your box, sorry!");
}

Expand Down

0 comments on commit 4022b0d

Please sign in to comment.