diff -r 7a4b57b3e66a -r 4c81f4393773 cmd/notifications.go --- a/cmd/notifications.go Fri Apr 28 11:49:22 2017 +0200 +++ b/cmd/notifications.go Fri Apr 28 13:31:40 2017 +0200 @@ -14,8 +14,8 @@ ) var notificationsOpts struct { - list, clear bool - notifID int + list, clear, dismiss bool + notifID int } // notificationsCmd represents the notifications subcommand @@ -25,6 +25,7 @@ Short: "Manage notifications", Example: ` madonctl accounts notifications --list madonctl accounts notifications --list --clear + madonctl accounts notifications --dismiss --notification-id N madonctl accounts notifications --notification-id N`, //Long: `TBW...`, RunE: notificationRunE, @@ -35,6 +36,7 @@ notificationsCmd.Flags().BoolVar(¬ificationsOpts.list, "list", false, "List all current notifications") notificationsCmd.Flags().BoolVar(¬ificationsOpts.clear, "clear", false, "Clear all current notifications") + notificationsCmd.Flags().BoolVar(¬ificationsOpts.dismiss, "dismiss", false, "Delete a notification") notificationsCmd.Flags().IntVar(¬ificationsOpts.notifID, "notification-id", 0, "Get a notification") } @@ -60,7 +62,11 @@ } obj = notifications } else if opt.notifID > 0 { - obj, err = gClient.GetNotification(opt.notifID) + if opt.dismiss { + err = gClient.DismissNotification(opt.notifID) + } else { + obj, err = gClient.GetNotification(opt.notifID) + } } if err == nil && opt.clear {