Merge pull request #64 from zetamatta/fix-mstdnexe-toot-iflag

`mstdn.exe toot` failed because -i option's value type remained int64 yet.
This commit is contained in:
mattn 2017-10-26 14:52:43 +09:00 committed by GitHub
commit 689663979a
2 changed files with 3 additions and 3 deletions

View File

@ -27,7 +27,7 @@ func cmdToot(c *cli.Context) error {
client := c.App.Metadata["client"].(*mastodon.Client) client := c.App.Metadata["client"].(*mastodon.Client)
_, err := client.PostStatus(context.Background(), &mastodon.Toot{ _, err := client.PostStatus(context.Background(), &mastodon.Toot{
Status: toot, Status: toot,
InReplyToID: mastodon.ID(fmt.Sprint(c.Int64("i"))), InReplyToID: mastodon.ID(fmt.Sprint(c.String("i"))),
}) })
return err return err
} }

View File

@ -199,10 +199,10 @@ func makeApp() *cli.App {
Usage: "post utf-8 string from a file(\"-\" means STDIN)", Usage: "post utf-8 string from a file(\"-\" means STDIN)",
Value: "", Value: "",
}, },
cli.IntFlag{ cli.StringFlag{
Name: "i", Name: "i",
Usage: "in-reply-to", Usage: "in-reply-to",
Value: 0, Value: "",
}, },
}, },
Action: cmdToot, Action: cmdToot,