diff --git a/pkg/controllers/auditing.go b/pkg/controllers/auditing.go index 517957d..7fd8a49 100644 --- a/pkg/controllers/auditing.go +++ b/pkg/controllers/auditing.go @@ -12,7 +12,8 @@ func (a *Auditing) Send(event Event) { return } log.WithFields(log.Fields{ - "user": event.Action.User, - "action": event.Action.Type, + "channel": event.Action.Channel, + "user": event.Action.User, + "action": event.Action.Type, }).Info(event.Message) } diff --git a/pkg/controllers/controller.go b/pkg/controllers/controller.go index 10416fb..a7e10dc 100644 --- a/pkg/controllers/controller.go +++ b/pkg/controllers/controller.go @@ -193,8 +193,9 @@ func (c *Controller) Notify(action ActionType, user string) { c.notifications.events <- Event{ ID: state.ID, Action: Action{ - Type: action, - User: user, + Type: action, + User: user, + Channel: state.ID, }, State: state, } diff --git a/pkg/controllers/notify.go b/pkg/controllers/notify.go index 6d73709..0baf804 100644 --- a/pkg/controllers/notify.go +++ b/pkg/controllers/notify.go @@ -3,8 +3,9 @@ package controllers type ActionType string type Action struct { - Type ActionType `json:"type"` - User string `json:"user"` + Type ActionType `json:"type"` + User string `json:"user"` + Channel string `json:"channel"` } var (