From 2cd5db047ee62078f7f14b66a61b8dfd196cd733 Mon Sep 17 00:00:00 2001 From: Gregory Rudolph Date: Thu, 3 Oct 2019 09:21:39 -0400 Subject: [PATCH] Breakout react --- main.go | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/main.go b/main.go index ee930eb..bc740fb 100644 --- a/main.go +++ b/main.go @@ -333,16 +333,7 @@ func handleMessage(api keybase.ChatAPI) { } } } -func reactToMessage(reaction string) { - chat := k.NewChat(channel) - chat.React(lastMessage.ID, reaction) -} -func reactToMessageId(messageId string, reaction string) { - chat := k.NewChat(channel) - ID, _ := strconv.Atoi(messageId) - chat.React(ID, reaction) -} func handleInput() error { clearView("Input") inputString, _ := getInputString() @@ -361,11 +352,8 @@ func handleInput() error { return nil } } - if inputString[:1] == "+" { - reactToMessage(strings.Replace(inputString, "+", "", 1)) - } else { - go sendChat(inputString) - } + + go sendChat(inputString) go populateList() return nil }