diff --git a/cmd/root.go b/cmd/root.go
index c9f094a1883304107ea6cbdf5cd7d0c51fc6a7a4..57e900e14f48cdb129ca8189590c1f5cbb2426d5 100644
--- a/cmd/root.go
+++ b/cmd/root.go
@@ -316,6 +316,18 @@ var rootCmd = &cobra.Command{
client.DeleteAllRequests()
}
+ if viper.GetBool("delete-receive-request") {
+ client.DeleteReceiveRequest(recipientID)
+ }
+
+ if viper.GetBool("delete-sent-request") {
+ client.DeleteSentRequest(recipientID)
+ }
+
+ if viper.GetBool("delete-request") {
+ client.DeleteRequest(recipientID)
+ }
+
msg := message.Send{
Recipient: recipientID,
Payload: []byte(msgBody),
@@ -1057,6 +1069,24 @@ func init() {
viper.BindPFlag("delete-all-requests",
rootCmd.PersistentFlags().Lookup("delete-all-requests"))
+ rootCmd.PersistentFlags().Bool("delete-receive-request", false,
+ "Delete receive request for the specified ID given by the "+
+ "destfile contact file.")
+ viper.BindPFlag("delete-receive-request",
+ rootCmd.PersistentFlags().Lookup("delete-receive-request"))
+
+ rootCmd.PersistentFlags().Bool("delete-sent-request", false,
+ "Delete sent request for the specified ID given by the "+
+ "destfile flag's contact file.")
+ viper.BindPFlag("delete-sent-request",
+ rootCmd.PersistentFlags().Lookup("delete-sent-request"))
+
+ rootCmd.PersistentFlags().Bool("delete-request", false,
+ "Delete the request for the specified ID given by the "+
+ "destfile flag's contact file.")
+ viper.BindPFlag("delete-request",
+ rootCmd.PersistentFlags().Lookup("delete-request"))
+
rootCmd.Flags().BoolP("send-auth-request", "", false,
"Send an auth request to the specified destination and wait"+
"for confirmation")