mirror of
https://github.com/hyperdxio/hyperdx
synced 2026-04-21 13:37:15 +00:00
10 lines
283 B
TypeScript
10 lines
283 B
TypeScript
import _ from 'lodash';
|
|
import { IncomingWebhook } from '@slack/webhook';
|
|
|
|
export function postMessageToWebhook(webhookUrl: string, message: any) {
|
|
const webhook = new IncomingWebhook(webhookUrl);
|
|
return webhook.send({
|
|
text: message.text,
|
|
blocks: message.blocks,
|
|
});
|
|
}
|