(context webhook.Context)
| 203 | } |
| 204 | |
| 205 | func (*Receiver) Post(context webhook.Context) error { |
| 206 | if context.DirectMessage && len(context.MentionEndUsers) > 0 { |
| 207 | if postDirectMessage(context) { |
| 208 | return nil |
| 209 | } |
| 210 | slog.Warn("failed to send direct messages for slack users, fallback to normal webhook", slog.String("event", context.EventType)) |
| 211 | } |
| 212 | return postMessage(context) |
| 213 | } |
| 214 | |
| 215 | func postMessage(context webhook.Context) error { |
| 216 | post := BuildMessage(context) |
nothing calls this directly
no test coverage detected