Browse Source

Don't try to edit other peoples messages

pull/5/head
Gregory Rudolph 5 years ago
parent
commit
c1e0e1452a
  1. 4
      cmdEdit.go

4
cmdEdit.go

@ -34,6 +34,10 @@ func cmdEdit(cmd []string) {
printToView("Feed", fmt.Sprintf("%+v", origMessage)) printToView("Feed", fmt.Sprintf("%+v", origMessage))
return 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 editString := origMessage.Result.Messages[0].Msg.Content.Text.Body
clearView("Edit") clearView("Edit")
popupView("Edit") popupView("Edit")

Loading…
Cancel
Save