From e6233bb494d9944ca4ba9b9c33a579b6f2070692 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Wed, 9 Nov 2016 12:23:19 +0800 Subject: [PATCH] update readme. Signed-off-by: Bo-Yi Wu --- README.md | 1 + plugin.go | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 6723663..3165426 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,7 @@ docker run --rm \ -e PLUGIN_VENUE=24.9163213,121.1424972,title,address \ -e PLUGIN_VIDEO=tests/video.mp4 \ -e PLUGIN_DEBUG=true \ + -e PLUGIN_ONLY_MATCH_EMAIL=false \ -e PLUGIN_FORMAT=markdown \ -e DRONE_REPO_OWNER=appleboy \ -e DRONE_REPO_NAME=go-hello \ diff --git a/plugin.go b/plugin.go index b3396d2..726292f 100644 --- a/plugin.go +++ b/plugin.go @@ -139,7 +139,7 @@ func convertLocation(value string) (Location, bool) { func parseTo(to []string, authorEmail string, matchEmail bool) []int64 { var emails []int64 var ids []int64 - attachChat := true + attachEmail := true for _, value := range to { idArray := trimElement(strings.Split(value, ":")) @@ -157,14 +157,14 @@ func parseTo(to []string, authorEmail string, matchEmail bool) []int64 { } emails = append(emails, id) - attachChat = false + attachEmail = false continue } ids = append(ids, id) } - if matchEmail == true && attachChat == false { + if matchEmail == true && attachEmail == false { return emails }