From cf584fafd03d0a9dbf9f5a81f162bc7d83e75e61 Mon Sep 17 00:00:00 2001
From: "Richard T. Carback III" <rick.carback@gmail.com>
Date: Fri, 6 Nov 2020 22:35:34 +0000
Subject: [PATCH] Make sure we write the contact and use the user contact
 object when sending to ourselves

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

diff --git a/cmd/root.go b/cmd/root.go
index 6ae30bd7e..7671feb73 100644
--- a/cmd/root.go
+++ b/cmd/root.go
@@ -137,13 +137,8 @@ var rootCmd = &cobra.Command{
 		}
 
 		user := client.GetUser()
-		contactBytes, _ := user.GetContact().Marshal()
 		jww.INFO.Printf("User: %s", user.ID)
-
-		jww.INFO.Printf("Contact User Bytes: %s", contactBytes)
-
-		jww.INFO.Printf("My User Contact: %s",
-			base64.StdEncoding.EncodeToString(contactBytes))
+		writeContact(user.GetContact())
 
 		// Set up reception handler
 		swboard := client.GetSwitchboard()
@@ -196,6 +191,7 @@ var rootCmd = &cobra.Command{
 		if recipientID == nil {
 			jww.INFO.Printf("sending message to self")
 			recipientID = user.ID
+			recipientContact = user.GetContact()
 		}
 
 		// Accept auth request for this recipient
-- 
GitLab