(context webhook.Context)
| 70 | } |
| 71 | |
| 72 | func (*Receiver) Post(context webhook.Context) error { |
| 73 | if context.DirectMessage && len(context.MentionEndUsers) > 0 { |
| 74 | if sendDirectMessage(context) { |
| 75 | return nil |
| 76 | } |
| 77 | } |
| 78 | return sendMessage(context) |
| 79 | } |
| 80 | |
| 81 | // returns true if the message is sent successfully. |
| 82 | func sendDirectMessage(webhookCtx webhook.Context) bool { |
nothing calls this directly
no test coverage detected