Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

fix: respect dm bool flag (#12507)

p0nyee2c68f8b739
diff --git a/backend/plugin/webhook/feishu/feishu.go b/backend/plugin/webhook/feishu/feishu.go
index 06f6e47161..d864f089ee 100644
--- a/backend/plugin/webhook/feishu/feishu.go
+++ b/backend/plugin/webhook/feishu/feishu.go
@@ -103,7 +103,7 @@ type feishuReceiver struct {
}
func (*feishuReceiver) Post(context webhook.Context) error {
- if len(context.MentionUsers) > 0 {
+ if context.DirectMessage && len(context.MentionUsers) > 0 {
postDirectMessage(context)
return nil
}
diff --git a/backend/plugin/webhook/slack/slack.go b/backend/plugin/webhook/slack/slack.go
index d061b27e06..45cf8f370d 100644
--- a/backend/plugin/webhook/slack/slack.go
+++ b/backend/plugin/webhook/slack/slack.go
@@ -124,7 +124,7 @@ func GetBlocks(context webhook.Context) []Block {
}
func (*Receiver) Post(context webhook.Context) error {
- if len(context.MentionUsers) > 0 {
+ if context.DirectMessage && len(context.MentionUsers) > 0 {
postDirectMessage(context)
return nil
}