From 7b952bdb4445871421edaf2253f8d159342b601a Mon Sep 17 00:00:00 2001
From: AkiraFukushima
Date: Mon, 9 Mar 2020 11:49:09 +0900
Subject: [PATCH] Fix default values
---
cmd/event.go | 2 +-
cmd/rtm.go | 2 +-
rage/rage.go | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/cmd/event.go b/cmd/event.go
index 7dcfb2c..3d380d9 100644
--- a/cmd/event.go
+++ b/cmd/event.go
@@ -22,7 +22,7 @@ func runEventCmd() *cobra.Command {
flags := cmd.Flags()
flags.IntVarP(&r.threshold, "threshold", "t", 10, "Threshold for rage judgement.")
- flags.IntVarP(&r.period, "period", "p", 60, "Observation period seconds for rage judgement. This CLI notify when there are more than threshold posts per period.")
+ flags.IntVarP(&r.period, "period", "p", 1200, "Observation period seconds for rage judgement. This CLI notify when there are more than threshold posts per period.")
flags.StringVarP(&r.channel, "channel", "c", "random", "Notify channel.")
flags.BoolVarP(&r.verbose, "verbose", "v", false, "Enable verbose mode")
diff --git a/cmd/rtm.go b/cmd/rtm.go
index 6d7e924..5fd02bc 100644
--- a/cmd/rtm.go
+++ b/cmd/rtm.go
@@ -22,7 +22,7 @@ func runRTMCmd() *cobra.Command {
flags := cmd.Flags()
flags.IntVarP(&r.threshold, "threshold", "t", 10, "Threshold for rage judgement.")
- flags.IntVarP(&r.period, "period", "p", 60, "Observation period seconds for rage judgement. This CLI notify when there are more than threshold posts per period.")
+ flags.IntVarP(&r.period, "period", "p", 1200, "Observation period seconds for rage judgement. This CLI notify when there are more than threshold posts per period.")
flags.StringVarP(&r.channel, "channel", "c", "random", "Notify channel.")
flags.BoolVarP(&r.verbose, "verbose", "v", false, "Enable verbose mode")
diff --git a/rage/rage.go b/rage/rage.go
index b37135f..6fd23bf 100644
--- a/rage/rage.go
+++ b/rage/rage.go
@@ -98,7 +98,7 @@ func (r *Rage) Detect(messageChannelID string, messageTimestamp string) error {
}
r.logger.Infof("%d speakers in the conversation", len(speakers))
- if len(speakers) < 1 {
+ if len(speakers) < 2 {
return nil
}