export ID for stream. add -i to reply
This commit is contained in:
parent
998ab3d74a
commit
e47dd5a618
3 changed files with 9 additions and 1 deletions
|
@ -13,6 +13,7 @@ import (
|
|||
)
|
||||
|
||||
type SimpleJSON struct {
|
||||
ID int64 `json:"id"`
|
||||
Username string `json:"username"`
|
||||
Avatar string `json:"avatar"`
|
||||
Content string `json:"content"`
|
||||
|
@ -41,6 +42,7 @@ func cmdStream(c *cli.Context) error {
|
|||
} else if asSimpleJSON {
|
||||
if t, ok := e.(*mastodon.UpdateEvent); ok {
|
||||
json.NewEncoder(c.App.Writer).Encode(&SimpleJSON{
|
||||
ID: t.Status.ID,
|
||||
Username: t.Status.Account.Username,
|
||||
Avatar: t.Status.Account.AvatarStatic,
|
||||
Content: textContent(t.Status.Content),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue