From aaeb9f1de2219bfa992afbd862cb1e6b59f309d0 Mon Sep 17 00:00:00 2001 From: Kaoru HAYAMA Date: Wed, 25 Oct 2017 20:26:28 +0900 Subject: [PATCH] Fix: on `mstdn.exe toot -i ID`: ID (and default) was int64 -> string --- cmd/mstdn/cmd_toot.go | 2 +- cmd/mstdn/main.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/mstdn/cmd_toot.go b/cmd/mstdn/cmd_toot.go index b2e41f4..7c2ee63 100644 --- a/cmd/mstdn/cmd_toot.go +++ b/cmd/mstdn/cmd_toot.go @@ -27,7 +27,7 @@ func cmdToot(c *cli.Context) error { client := c.App.Metadata["client"].(*mastodon.Client) _, err := client.PostStatus(context.Background(), &mastodon.Toot{ Status: toot, - InReplyToID: mastodon.ID(fmt.Sprint(c.Int64("i"))), + InReplyToID: mastodon.ID(fmt.Sprint(c.String("i"))), }) return err } diff --git a/cmd/mstdn/main.go b/cmd/mstdn/main.go index 392f748..7c67584 100644 --- a/cmd/mstdn/main.go +++ b/cmd/mstdn/main.go @@ -199,10 +199,10 @@ func makeApp() *cli.App { Usage: "post utf-8 string from a file(\"-\" means STDIN)", Value: "", }, - cli.IntFlag{ + cli.StringFlag{ Name: "i", Usage: "in-reply-to", - Value: 0, + Value: "", }, }, Action: cmdToot,