From ac5d7666fd8b518832c3279e5b44e09066102b70 Mon Sep 17 00:00:00 2001 From: walnuts1018 Date: Sun, 31 Mar 2024 20:16:54 +0900 Subject: [PATCH] add file_share --- slack/slack.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/slack/slack.go b/slack/slack.go index dedb25b..52310c5 100644 --- a/slack/slack.go +++ b/slack/slack.go @@ -192,8 +192,9 @@ func (c *Client) GetAllMCGMembers(ctx context.Context, mustIncludeUsers ...strin func (c *Client) ForwardMessage(ctx context.Context, everythingChannelID string, sourceChannelName string, message slackevents.MessageEvent) error { slog.Debug("Forwarding message", "everythingChannelID", everythingChannelID, "sourceChannelName", sourceChannelName, "message", message) - if message.SubType != "" && message.SubType != "message_deleted" && message.SubType != "message_changed" { - slog.Debug("Ignored message", "message", message) + allowedSubTypes := []string{"", "message_deleted", "message_changed", "file_share"} + if !slices.Contains(allowedSubTypes, message.SubType) { + slog.Info("Ignored message event", "subType", message.SubType) return nil }