From 3f26a37e3221c783c2a57c2908aeb1c6d21356c4 Mon Sep 17 00:00:00 2001 From: XZB-1248 <28593573+XZB-1248@users.noreply.github.com> Date: Thu, 19 Feb 2026 22:30:29 +0800 Subject: [PATCH] fix(slack): use full chatID as pendingAcks key in sendWithAttachments --- pkg/channels/slack.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/channels/slack.go b/pkg/channels/slack.go index 83b866388..1e6db73a7 100644 --- a/pkg/channels/slack.go +++ b/pkg/channels/slack.go @@ -121,7 +121,7 @@ func (c *SlackChannel) Send(ctx context.Context, msg bus.OutboundMessage) error // If there are attachments, send them if len(msg.Attachments) > 0 { - return c.sendWithAttachments(ctx, channelID, threadTS, msg.Content, msg.Attachments) + return c.sendWithAttachments(ctx, msg.ChatID, channelID, threadTS, msg.Content, msg.Attachments) } opts := []slack.MsgOption{ @@ -153,7 +153,7 @@ func (c *SlackChannel) Send(ctx context.Context, msg bus.OutboundMessage) error return nil } -func (c *SlackChannel) sendWithAttachments(ctx context.Context, channelID, threadTS, content string, attachments []bus.Attachment) error { +func (c *SlackChannel) sendWithAttachments(ctx context.Context, chatID, channelID, threadTS, content string, attachments []bus.Attachment) error { for _, attachment := range attachments { uploadErr := func() error { file, err := os.Open(attachment.Path) @@ -183,7 +183,7 @@ func (c *SlackChannel) sendWithAttachments(ctx context.Context, channelID, threa content = "" } - if ref, ok := c.pendingAcks.LoadAndDelete(channelID); ok { + if ref, ok := c.pendingAcks.LoadAndDelete(chatID); ok { msgRef := ref.(slackMessageRef) c.api.AddReaction("white_check_mark", slack.ItemRef{ Channel: msgRef.ChannelID,