fix: hide token in CI/CD log (#70)

fix https://github.com/appleboy/drone-telegram/issues/65
This commit is contained in:
Bo-Yi Wu 2019-02-17 17:39:15 +08:00 committed by GitHub
parent 71a0551697
commit b339fb0238
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -375,7 +375,11 @@ func (p Plugin) Send(bot *tgbotapi.BotAPI, msg tgbotapi.Chattable) error {
log.Println("=====================") log.Println("=====================")
} }
return err if err == nil {
return nil
}
return errors.New(strings.Replace(err.Error(), p.Config.Token, "<token>", -1))
} }
// Message is plugin default message. // Message is plugin default message.