292 indentedPrint(w, indent, false, false, "URL", "%s", s.URL) |
292 indentedPrint(w, indent, false, false, "URL", "%s", s.URL) |
293 // Display minimum details of attachments |
293 // Display minimum details of attachments |
294 //return p.PrintObj(s.MediaAttachments, w, indent+p.Indent) |
294 //return p.PrintObj(s.MediaAttachments, w, indent+p.Indent) |
295 for _, a := range s.MediaAttachments { |
295 for _, a := range s.MediaAttachments { |
296 indentedPrint(w, indent+p.Indent, true, false, "Attachment ID", "%d", a.ID) |
296 indentedPrint(w, indent+p.Indent, true, false, "Attachment ID", "%d", a.ID) |
297 if a.TextURL != "" { |
297 if a.TextURL != nil && *a.TextURL != "" { |
298 indentedPrint(w, indent+p.Indent, true, false, "Text URL", "%s", a.TextURL) |
298 indentedPrint(w, indent+p.Indent, true, false, "Text URL", "%s", *a.TextURL) |
299 } else if a.URL != "" { |
299 } else if a.URL != "" { |
300 indentedPrint(w, indent+p.Indent, false, false, "URL", "%s", a.URL) |
300 indentedPrint(w, indent+p.Indent, false, false, "URL", "%s", a.URL) |
301 } else { |
301 } else if a.RemoteURL != nil { |
302 indentedPrint(w, indent+p.Indent, false, false, "Remote URL", "%s", a.RemoteURL) |
302 indentedPrint(w, indent+p.Indent, false, false, "Remote URL", "%s", *a.RemoteURL) |
303 } |
303 } |
304 } |
304 } |
305 return nil |
305 return nil |
306 } |
306 } |
307 |
307 |