From 412a11790a3707767718632d07a37e8e084d28d2 Mon Sep 17 00:00:00 2001 From: Gregory Rudolph Date: Tue, 3 Mar 2020 11:01:26 -0500 Subject: [PATCH] Goroutine the chat.React() calls --- mailHelper.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mailHelper.go b/mailHelper.go index 6173aee..4c150f0 100644 --- a/mailHelper.go +++ b/mailHelper.go @@ -23,22 +23,22 @@ func send(e Email, api keybase.ChatAPI) { log.LogInfo("Message created") log.LogDebug(message) log.LogInfo("Sending message") - chat.React(api.Msg.ID, ":mailbox_with_no_mail:") + go chat.React(api.Msg.ID, ":mailbox_with_no_mail:") if conf.KeyPass == "" { - chat.React(api.Msg.ID, ":unlock:") + go chat.React(api.Msg.ID, ":unlock:") } else { - chat.React(api.Msg.ID, ":lock_with_ink_pen:") + go chat.React(api.Msg.ID, ":lock_with_ink_pen:") } err := smtp.SendMail(conf.SmtpServer, smtp.PlainAuth("", conf.MyEmail, conf.EmailPass, conf.AuthServer), conf.MyEmail, e.Recipients, []byte(message)) - chat.React(api.Msg.ID, ":mailbox_with_no_mail:") + go chat.React(api.Msg.ID, ":mailbox_with_no_mail:") if err != nil { log.LogErrorType(err) chat.React(api.Msg.ID, ":warning:") return } - chat.React(api.Msg.ID, ":mailbox_with_mail:") + go chat.React(api.Msg.ID, ":mailbox_with_mail:") log.LogInfo("Email Sent") }