Skip to content

Commit

Permalink
add file_share
Browse files Browse the repository at this point in the history
  • Loading branch information
walnuts1018 committed Mar 31, 2024
1 parent cbdb529 commit ac5d766
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions slack/slack.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit ac5d766

Please sign in to comment.