cmd/accounts.go
changeset 28 79aa812c0dd2
parent 22 5778b09bc6fe
child 29 4f12e5d4ef75
--- a/cmd/accounts.go	Sat Apr 29 13:28:05 2017 +0200
+++ b/cmd/accounts.go	Sat Apr 29 13:54:04 2017 +0200
@@ -320,6 +320,19 @@
 		if opt.accountID < 1 || len(opt.statusIDs) == 0 || opt.comment == "" {
 			return errors.New("missing parameter")
 		}
+	case "followers", "following", "statuses":
+		// If the user's account ID is missing, get it
+		if opt.accountID < 1 {
+			// Sign in now to look the user id up
+			if err := madonInit(true); err != nil {
+				return err
+			}
+			account, err := gClient.GetCurrentAccount()
+			if err != nil {
+				return err
+			}
+			opt.accountID = account.ID
+		}
 	default:
 		// The other subcommands here require an account ID
 		if opt.accountID < 1 {