Skip to content
Snippets Groups Projects
Commit cedf034b authored by Richard T. Carback III's avatar Richard T. Carback III
Browse files

Send to yourself when destid is not set

parent c65a8b89
No related branches found
No related tags found
No related merge requests found
......@@ -167,6 +167,11 @@ var rootCmd = &cobra.Command{
isPrecanPartner)
}
if recipientID == nil {
jww.INFO.Printf("sending message to self")
recipientID = user.ID
}
msg := message.Send{
Recipient: recipientID,
Payload: []byte(msgBody),
......@@ -309,6 +314,10 @@ func getPrecanID(recipientID *id.ID) uint {
}
func parseRecipient(idStr string) (*id.ID, bool) {
if idStr == "0" {
return nil, false
}
var recipientID *id.ID
if strings.HasPrefix(idStr, "0x") {
recipientID = getUIDFromHexString(idStr[2:])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment