From 0180979e4801f6d9cade734d0415e2e551f7b1a1 Mon Sep 17 00:00:00 2001
From: Benjamin Wenger <ben@elixxir.ioo>
Date: Sat, 17 Aug 2019 15:52:45 -0700
Subject: [PATCH] updated the cli so when no id is specified a message is sent
 to yourself

---
 cmd/root.go | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/cmd/root.go b/cmd/root.go
index 5391d302a..671e8aefb 100644
--- a/cmd/root.go
+++ b/cmd/root.go
@@ -384,8 +384,14 @@ var rootCmd = &cobra.Command{
 			cryptoType = parse.E2E
 		}
 
-		// Only send a message if we have a message to send (except dummy messages)
-		recipientId := id.NewUserFromUints(&[4]uint64{0, 0, 0, destinationUserId})
+		var recipientId *id.User
+
+		if destinationUserId == 0 {
+			recipientId = userID
+		} else {
+			recipientId = id.NewUserFromUints(&[4]uint64{0, 0, 0, destinationUserId})
+		}
+
 		if message != "" {
 			// Get the recipient's nick
 			recipientNick := ""
-- 
GitLab