# HG changeset patch # User Mikael Berthe # Date 1536079062 -7200 # Node ID e93d9c738273a03f06faaede926027fc660d2195 # Parent 970c319e1f7ce7e1d8e5f94f8817f13c0c331c2f Add '--bot' flag to madonctl account update diff -r 970c319e1f7c -r e93d9c738273 cmd/accounts.go --- a/cmd/accounts.go Tue Sep 04 17:36:13 2018 +0200 +++ b/cmd/accounts.go Tue Sep 04 18:37:42 2018 +0200 @@ -37,7 +37,7 @@ comment string // For account reports displayName, note string // For account update avatar, header string // For account update - locked bool // For account update + locked, bot bool // For account update muteNotifications bool // For account mute following bool // For account search } @@ -87,6 +87,7 @@ accountUpdateSubcommand.Flags().StringVar(&accountsOpts.avatar, "avatar", "", "User avatar image") accountUpdateSubcommand.Flags().StringVar(&accountsOpts.header, "header", "", "User header image") accountUpdateSubcommand.Flags().BoolVar(&accountsOpts.locked, "locked", false, "Following account requires approval") + accountUpdateSubcommand.Flags().BoolVar(&accountsOpts.bot, "bot", false, "Set as service (automated) account") // Those variables will be used to check if the options were // explicitly set or not @@ -647,9 +648,13 @@ change = true } + if accountUpdateFlags.Lookup("bot").Changed { + updateParams.Bot = &opt.bot + change = true + } + /* TODO: - updateParams.Bot updateParams.FieldsAttributes updateParams.Source */