Skip to content

Commit

Permalink
backport isvalid
Browse files Browse the repository at this point in the history
  • Loading branch information
rusq committed Mar 9, 2024
1 parent fdcd778 commit d54a5d5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions downloader/downloader.go
Original file line number Diff line number Diff line change
Expand Up @@ -337,3 +337,8 @@ func (c *Client) l() logger.Interface {
}
return c.dlog
}

// IsValid returns true if the file can be downloaded and is valid.
func IsValid(f *slack.File) bool {
return f.Mode != "hidden_by_limit" && f.Mode != "external" && !f.IsExternal && f.Mode != "tombstone" && f.Name != ""
}

0 comments on commit d54a5d5

Please sign in to comment.