--- a/printer/plainprinter.go Thu May 11 18:05:06 2017 +0200
+++ b/printer/plainprinter.go Thu May 11 18:48:22 2017 +0200
@@ -262,11 +262,19 @@
func (p *PlainPrinter) plainPrintStatus(s *madon.Status, w io.Writer, indent string) error {
indentedPrint(w, indent, true, false, "Status ID", "%d", s.ID)
- indentedPrint(w, indent, false, false, "From", "%s", s.Account.Acct)
+ if s.Account != nil {
+ author := s.Account.Acct
+ if s.Account.DisplayName != "" {
+ author += " (" + s.Account.DisplayName + ")"
+ }
+ indentedPrint(w, indent, false, false, "From", "%s", author)
+ }
indentedPrint(w, indent, false, false, "Timestamp", "%v", s.CreatedAt.Local())
if s.Reblog != nil {
- indentedPrint(w, indent, false, false, "Reblogged from", "%s", s.Reblog.Account.Username)
+ if s.Reblog.Account != nil {
+ indentedPrint(w, indent, false, false, "Reblogged from", "%s", s.Reblog.Account.Username)
+ }
return p.plainPrintStatus(s.Reblog, w, indent+p.Indent)
}