Skip to content

Commit 49718ac

Browse files
committed
avoid trying to send message when no receiver is set
Fixes normen#26
1 parent 6a97d6d commit 49718ac

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

main.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,11 @@ func EnterCommand(key tcell.Key) {
485485
textInput.SetText("")
486486
return
487487
}
488+
if currentReceiver.Id == "" {
489+
PrintText("no receiver")
490+
textInput.SetText("")
491+
return
492+
}
488493
// no command, send as message
489494
msg := messages.Command{
490495
Name: "send",

0 commit comments

Comments
 (0)