mirror of
https://github.com/bitwarden/server.git
synced 2025-06-06 19:20:33 -05:00

* [PM-17562] Add strict delay support for RabbitMQ * fix lint error * Added more robust FailureReason handling and some additional tests * Fix two issues noted by SonarQube * Fix typo; Add alternate handling if MessageId is null or empty * Set MessageId on all message publishers
22 lines
668 B
C#
22 lines
668 B
C#
#nullable enable
|
|
|
|
using Bit.Core.AdminConsole.Models.Data.Integrations;
|
|
|
|
namespace Bit.Core.Services;
|
|
|
|
public class SlackIntegrationHandler(
|
|
ISlackService slackService)
|
|
: IntegrationHandlerBase<SlackIntegrationConfigurationDetails>
|
|
{
|
|
public override async Task<IntegrationHandlerResult> HandleAsync(IntegrationMessage<SlackIntegrationConfigurationDetails> message)
|
|
{
|
|
await slackService.SendSlackMessageByChannelIdAsync(
|
|
message.Configuration.token,
|
|
message.RenderedTemplate,
|
|
message.Configuration.channelId
|
|
);
|
|
|
|
return new IntegrationHandlerResult(success: true, message: message);
|
|
}
|
|
}
|