Skip to content
Snippets Groups Projects
Commit 3223ee7f authored by Josh Brooks's avatar Josh Brooks
Browse files

Move delete contact CLI logic

parent e1c08b23
No related branches found
No related tags found
1 merge request!23Release
......@@ -157,12 +157,6 @@ var rootCmd = &cobra.Command{
authConfirmed = true
}
// Delete this recipient
if viper.GetBool("delete-channel") {
jww.FATAL.Printf("Deleting contact with ID %s", recipientID)
deleteChannel(client, recipientID)
}
if client.HasAuthenticatedChannel(recipientID) {
jww.INFO.Printf("Authenticated channel already in "+
"place for %s", recipientID)
......@@ -202,6 +196,12 @@ var rootCmd = &cobra.Command{
" took %d seconds", scnt)
}
// Delete this recipient
if viper.GetBool("delete-channel") {
jww.FATAL.Printf("Deleting contact with ID %s", recipientID)
deleteChannel(client, recipientID)
}
msg := message.Send{
Recipient: recipientID,
Payload: []byte(msgBody),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment