From 5735baf72c1bcddede9754c9d5d1647c8b869785 Mon Sep 17 00:00:00 2001 From: Gregory Rudolph Date: Fri, 4 Oct 2019 12:32:55 -0400 Subject: [PATCH] Show error when editing someone else's message/things break --- cmdEdit.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmdEdit.go b/cmdEdit.go index ac9e4cc..1cde233 100644 --- a/cmdEdit.go +++ b/cmdEdit.go @@ -33,7 +33,10 @@ func cmdEdit(cmd []string) { messageId, _ = strconv.Atoi(cmd[1]) chat := k.NewChat(channel) newMessage := strings.Join(cmd[2:], " ") - chat.Edit(messageId,newMessage) + _, err := chat.Edit(messageId,newMessage) + if err != nil { + printToView("Feed", fmt.Sprintf("Error editing message %d, %+v", messageId, err)) + } }