Fix: on `mstdn.exe toot -i ID`: ID (and default) was int64 -> string

pull/64/head
Kaoru HAYAMA 2017-10-25 20:26:28 +09:00
parent d38a3e6dfc
commit aaeb9f1de2
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,