Sync with Madon library update
authorMikael Berthe <mikael@lilotux.net>
Sat, 27 May 2017 18:41:32 +0200
changeset 150 7f46bcaf240c
parent 149 e2be5743856b
child 151 466aabf6c90a
Sync with Madon library update
printer/plainprinter.go
--- a/printer/plainprinter.go	Sat May 27 18:39:13 2017 +0200
+++ b/printer/plainprinter.go	Sat May 27 18:41:32 2017 +0200
@@ -294,12 +294,12 @@
 	//return p.PrintObj(s.MediaAttachments, w, indent+p.Indent)
 	for _, a := range s.MediaAttachments {
 		indentedPrint(w, indent+p.Indent, true, false, "Attachment ID", "%d", a.ID)
-		if a.TextURL != "" {
-			indentedPrint(w, indent+p.Indent, true, false, "Text URL", "%s", a.TextURL)
+		if a.TextURL != nil && *a.TextURL != "" {
+			indentedPrint(w, indent+p.Indent, true, false, "Text URL", "%s", *a.TextURL)
 		} else if a.URL != "" {
 			indentedPrint(w, indent+p.Indent, false, false, "URL", "%s", a.URL)
-		} else {
-			indentedPrint(w, indent+p.Indent, false, false, "Remote URL", "%s", a.RemoteURL)
+		} else if a.RemoteURL != nil {
+			indentedPrint(w, indent+p.Indent, false, false, "Remote URL", "%s", *a.RemoteURL)
 		}
 	}
 	return nil