From 1169713d28f3b212dde2d44fe933a6847c305380 Mon Sep 17 00:00:00 2001 From: gutmet Date: Sun, 20 Sep 2020 09:27:30 +0200 Subject: [PATCH] display quoted tweets --- drivel.go | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivel.go b/drivel.go index d148105..e9e64a2 100644 --- a/drivel.go +++ b/drivel.go @@ -507,13 +507,18 @@ func quote(args []string) error { } type Status struct { - Full_text string - Id_str string - User StatusUser + Full_text string + Id_str string + User StatusUser + Quoted_status *Status } func (m Status) String() string { - return m.User.Name + " " + "(" + m.Id_str + ")" + ":\n" + m.Full_text + s := m.User.Name + " " + "(" + m.Id_str + ")" + ":\n" + m.Full_text + if m.Quoted_status != nil { + s += "\nQuotes " + m.Quoted_status.String() + } + return s } func (m Status) URL() string {