Documentation
¶
Overview ¶
Package send posts a message to Slack as the user.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotLoggedIn = errors.New("not logged in to Slack") ErrAmbiguous = errors.New("the target is ambiguous") ErrCannotPost = errors.New("cannot post to the target") ErrNotAllowed = errors.New("the target is not in the post allowlist") )
These are wrapped with the detail.
Functions ¶
Types ¶
type Service ¶
type Service struct {
Client *slack.Client
Log func(format string, args ...any)
// PostAllowlist, when not empty, is the only set of conversations Send may post to:
// channel ids, or user ids naming the DM with that user. Config slack.post_allowlist.
PostAllowlist []string
// contains filtered or unexported fields
}
func (*Service) Allowed ¶
Allowed is nil when PostAllowlist is empty or holds res.Channel or res.DMUser.
Click to show internal directories.
Click to hide internal directories.