slack
This commit is contained in:
1 parent
e18681606c
commit
0e1dc3e3fe
3 files changed
+173
-5
No files matched your search
@@ -71,7 +71,7 @@ export class NotificationsService implements INotificationsService {
|
||||
const settings = this.settingsService.getSettings();
|
||||
const clientHost = settings.clientHost || "Host not defined";
|
||||
|
||||
// For webhook notifications, try new sendMessage method if available
|
||||
// Route to new sendMessage method if provider supports it
|
||||
if (notification.type === "webhook" && this.webhookProvider.sendMessage && notificationMessage) {
|
||||
this.logger.info({
|
||||
message: "[NEW] Using sendMessage for webhook",
|
||||
@@ -81,6 +81,15 @@ export class NotificationsService implements INotificationsService {
|
||||
return await this.webhookProvider.sendMessage(notification, notificationMessage);
|
||||
}
|
||||
|
||||
if (notification.type === "slack" && this.slackProvider.sendMessage && notificationMessage) {
|
||||
this.logger.info({
|
||||
message: "[NEW] Using sendMessage for slack",
|
||||
service: SERVICE_NAME,
|
||||
method: "send",
|
||||
});
|
||||
return await this.slackProvider.sendMessage(notification, notificationMessage);
|
||||
}
|
||||
|
||||
// Fallback to existing sendAlert for all providers
|
||||
switch (notification.type) {
|
||||
case "email":
|
||||
|
||||
Reference in new issue
Block a user