From c15a37cc816e429d6f6e9f2d156481d32513e0a9 Mon Sep 17 00:00:00 2001 From: Gregory Rudolph Date: Mon, 7 Oct 2019 10:56:42 -0400 Subject: [PATCH] Add error/post success messages --- cmdPost.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cmdPost.go b/cmdPost.go index 8147660..8172a21 100644 --- a/cmdPost.go +++ b/cmdPost.go @@ -3,7 +3,7 @@ package main import ( - + "fmt" "strings" "samhofi.us/x/keybase" @@ -26,5 +26,10 @@ func cmdPost(cmd []string) { pubChan.Name = k.Username post := strings.Join(cmd[1:], " ") chat := k.NewChat(pubChan) - chat.Send(post) + _, err := chat.Send(post) + if err != nil { + printToView("Feed", fmt.Sprintf("There was an error with your post: %+v", err)) + } else { + printToView("Feed", "You have publically posted to your wall, signed by your current device.") + } }