From 293a9e0aba9464c79b78048418b8943d87f39886 Mon Sep 17 00:00:00 2001 From: Yasuhiro Matsumoto Date: Wed, 19 Apr 2017 23:58:58 +0900 Subject: [PATCH] todo --- cmd/mstdn/cmd_stream.go | 2 +- cmd/mstdn/main.go | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/mstdn/cmd_stream.go b/cmd/mstdn/cmd_stream.go index 6109349..a40f998 100644 --- a/cmd/mstdn/cmd_stream.go +++ b/cmd/mstdn/cmd_stream.go @@ -75,7 +75,7 @@ func cmdStream(c *cli.Context) error { case *mastodon.UpdateEvent: s.displayStatus(c.App.Writer, t.Status) case *mastodon.NotificationEvent: - s.displayStatus(c.App.Writer, t.Notification.Status) + // TODO s.displayStatus(c.App.Writer, t.Notification.Status) case *mastodon.ErrorEvent: s.displayError(c.App.Writer, t) } diff --git a/cmd/mstdn/main.go b/cmd/mstdn/main.go index 129fe0b..3e3de9c 100644 --- a/cmd/mstdn/main.go +++ b/cmd/mstdn/main.go @@ -289,6 +289,9 @@ func (s *screen) displayError(w io.Writer, e error) { } func (s *screen) displayStatus(w io.Writer, t *mastodon.Status) { + if t == nil { + return + } if t.Reblog != nil { color.Set(color.FgHiRed) fmt.Fprint(w, s.acct(t.Account.Acct))