From 7ea350789e5a296e7c22d5e96cb0391251a625e4 Mon Sep 17 00:00:00 2001 From: Gregory Rudolph Date: Thu, 3 Oct 2019 07:58:01 -0400 Subject: [PATCH] Command breakouts for join and upload --- main.go | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/main.go b/main.go index 975b5c6..ed544b9 100644 --- a/main.go +++ b/main.go @@ -124,15 +124,7 @@ func formatOutput(api keybase.ChatAPI) string { } return ret } -func uploadFile(g *gocui.Gui, filePath string, fileName string) { - chat := k.NewChat(channel) - _, err := chat.Upload(fileName, filePath) - if err != nil { - printToView(g, "Feed", fmt.Sprintf("There was an error uploading %s to %s", filePath, channel.Name)) - } else { - printToView(g, "Feed", fmt.Sprintf("Uploaded %s to %s", filePath, channel.Name)) - } -} + func downloadFile(g *gocui.Gui, messageID int, fileName string) { chat := k.NewChat(channel) _, err := chat.Download(messageID, fmt.Sprintf("%s/%s", downloadPath, fileName))