From c1e0e1452a3cd0104f1249f641d7f1e5147128f4 Mon Sep 17 00:00:00 2001 From: Gregory Rudolph Date: Fri, 11 Oct 2019 08:45:34 -0400 Subject: [PATCH] Don't try to edit other peoples messages --- cmdEdit.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmdEdit.go b/cmdEdit.go index aaebe84..cd4fdff 100644 --- a/cmdEdit.go +++ b/cmdEdit.go @@ -34,6 +34,10 @@ func cmdEdit(cmd []string) { printToView("Feed", fmt.Sprintf("%+v", origMessage)) return } + if origMessage.Result.Messages[0].Msg.Sender.Username != k.Username { + printToView("Feed", "You cannot edit another user's messages.") + return + } editString := origMessage.Result.Messages[0].Msg.Content.Text.Body clearView("Edit") popupView("Edit")