Skip to content

Commit

Permalink
fix(report): send report to each slack channel (#1530)
Browse files Browse the repository at this point in the history
* fix send report to each slack channel

* fix(report): use w.Cnf.Channel instead of channel

Co-authored-by: MaineK00n <mainek00n.1229@gmail.com>
  • Loading branch information
tomofumi0003 and MaineK00n authored Sep 29, 2022
1 parent f7299b9 commit 6963442
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions reporter/slack.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ type message struct {

func (w SlackWriter) Write(rs ...models.ScanResult) (err error) {

channel := w.Cnf.Channel
for _, r := range rs {
w.lang, w.osFamily = r.Lang, r.Family
if channel == "${servername}" {
channel := w.Cnf.Channel
if w.Cnf.Channel == "${servername}" {
channel = fmt.Sprintf("#%s", r.ServerName)
}

Expand Down

0 comments on commit 6963442

Please sign in to comment.